0

How to redirect www...
 
Notifications
Clear all

[Solved] How to redirect www to non-www site in dns records?

1 Posts
2 Users
1 Reactions
1,193 Views
0
Topic starter

Hi, I have a website without www at the beginning of cannocical normally. but when i try to enter www before my site name it give error like: “Server not Found - Hmm, we’re having trouble reaching that site”. I tried to find a tutorial but can't find one. any solutions?

Topic Tags
1 Answer
1

In order to set up the desired redirect, www.example.com to example.com or vice versa, you must have an A record for each name.

Open whatever you use to manage your DNS. For our example, we’ll use the teknonel.com dns records

If a domain (also known as a zone) record does not already exist, create one now. The hostname should be your domain, e.g. example.com, and the IP address should be set to the public IP address of your Apache server. This will automatically create an A record that points your domain to the IP address that you specified. If you are using another system to manage your domain, you may need to add this manually.

Next, add another A record with “www” as the hostname (or “www.example.com” if the partial subdomain doesn’t work), and specify the same IP address.

When you have created both records, it should look something like this:

 

 
We are using cloudflare. That's why our IP address is auto proxied with cloudflare's system.