Do you want to redirect naked domain to “www”? You’re in the right place. In this tutorial we will guide you step-by-step on how to redirect a naked domain to “www” if your domain hosting doesn’t provide DNS hosting.
Domain without “www” is called naked domain like “example.com“, “https://example.com“, “http://example.com“. In order to setup a naked redirect you need to redirect your naked domain to “www” domain by adding the 4 “A Records” in your domain’s DNS Settings that point to Google IPs.
The “A Record” maps a domain name to an IP address. CNAME Record is a type of resource record in the DNS which maps one domain name to another. CNAME Records are widely used by Blogger users to redirect their .blogspot domain to custom domain.
Some of the domain hostings or registrars do not provide DNS hosting/settings of your domain. They only allow you to add “Nameservers”. It means that you can’t add “A Records” and “CNAME Records” to your domain.
To solve this issue you can use FreeDNS hosting. There are hosting companies like CloudFlare, Namecheap, etc, that provide FreeDNS hosting. We have tried both CloudFlare & Namecheap FreeDNS hosting, but Namecheap is the best. CloudFlare causes issues with SSL.
Namecheap is one of the leading web hosting companies. It offers FreeDNS hosting service, for people whose registrars/hostings don’t provide DNS hosting with domain registration. Namecheap’s FreeDNS supports A/AAAA/CNAME/NS/MX/TXT/SRV DNS record types.
- Why It Is Important To Redirect Your Naked Domain To “www”?
- How To Extract “A Records” & “CNAME Records” Information
- How To Add 4 “A Records” & 2 “CNAME Records” In Namecheap’s FreeDNS Hosting
- How To Replace Your Domain’s Nameservers With Namecheap’s Nameservers
- How To Check Nameservers Updated Or Not
- How To Fix, “This Site Can’t Be Reached” Error
Why It Is Important To Redirect Your Naked Domain To “www”?
There are 2 reasons why it is important to redirect your naked domain to “www”:
- One, most of the people type your domain name without “www” like “example.com”. If your naked domain is not redirected to “www” browser will show error to website visitors like “website not found” etc, as a result visitors might not comeback to your website again and it also hurts the SEO of your website.
- Second, if your website is monetized with Google Adsense you will see a warning from Google Adsense that “Earnings at risk – One or more of your sites does not have an ads.txt file. Fix this now to avoid severe impact to your revenue.” Most of the people search on internet to resolve this warning, but they don’t find any satisfying solution and they ask, “Though we have added the ads.txt file, but still Google Adsense shows the warning.”
Now why Google Adsense shows this warning despite adding “ads.txt” because with the naked domain “ads.txt” is not accessible.
After adding the “ads.txt” if you access it by “www.example.com/ads.txt” it will open in your browser, but if you access “ads.txt” by naked domain like “example.com/ads.txt”, “http://example.com/ads.txt” or “https://example.com/ads.txt” it won’t open and that’s why Google Adsense shows the warning.
How To Extract “A Records” & CNAME Records” Information
Before you learn how to add “A Records” & “CNAME Records” it is important to extract the information from the file like what is Host, what is Value and what is TTL. So it would be easy for you to add these records in Namecheap’s FreeDNS hosting in the next step.
- Blogger’s DNS Setting file will be similar to this:
- In order to learn how to get this file and how to redirect your (.blogspot) URL to custom domain read our tutorial: How To Redirect Blogspot To Custom Domain.
- Here we have extracted information for your ease. It is the same file as above, but we have separated the lines into 2 boxes.
- In the top box there are 4 different “A Records” and in bottom box there are 2 CNAMEs.
- A Records and 1st CNAME are same for every domain, only the 2nd CNAME is unique for everyone.
For A Records
- “@” means root site. It is HOST. In our case it is “meersworld.net”
- “3600” is the TTL for each record. TTL stands for Time-To-Live. 3600 means 60 minutes.
- There are 4 Google IP addresses which are called VALUE.
Now come to CNAMEs
- 1st CNAME: “www” is HOST. “3600” is TTL. “ghs.google.com” is VALUE.
- 2nd CNAME: first variable “z——-” is your HOST. “3600” is TTL. “———–dv.googlehosted.com” is VALUE.
How To Add 4 “A Records” & 2 CNAMEs In Namecheap’s FreeDNS Hosting
- Go to Namecheap Official Website.
- Click Domains.
- Click FreeDNS.
- Enter your domain name without “www” like “example.com”.
- Click “Get DNS.
- It will ask you to either Signup or Sign In. If you are already not registered with the Namecheap, create your account..
- Enter a unique Username and provide other required information.
- Once you signup Namecheap will tell you whether your domain is eligible or not. You can see that it has shown “Eligible for FreeDNS”.
- Click the “Free Basket” icon.
- Click “Set up DNS” button.
- Copy these 5 nameservers into a notepad file. These will be used in the Next step.
- Click the “Downward arrow” beside your “Username” at top.
- Click Dashboard.
- Click “Advanced DNS” tab.
- Click or right-click on home icon.
- Click Manage.
- Click “ADD NEW RECORD”.
- There could be some already existing records. You can delete them or leave them.
- First we will add 4 “A Records”.
- Click “A Record”.
- We have shown above how to extract information from DNS Settings file.
- These are the 4 “A Records” that you have to enter one-by-one: 126.96.36.199 | 188.8.131.52 | 184.108.40.206 | 220.127.116.11
- In Host, enter “@”.
- In Value enter the IP address.
- In TTL choose “60 min” means 3600 seconds.
- Click “Green Tick” to save changes.
- Add other “A Records” in similar way.
- You can see that we have added 4 “A Records”.
- Now add 2 CNAMEs.
- Click “ADD NEW RECORD”.
- Click “CNAME Record”.
- In Host, enter ‘”www”.
- In Value, enter “ghs.google.com”.
- In TTL, choose “60 min”.
- Add the second CNAME similarly as you have added the 1st one.
- Now here you can see that there are 4 “A Records” & 2 CNAME Records. The 4 “A Records” will setup a naked redirect for your domain to “www” Whereas the 2 “CNAME Records” will redirect a “.blogspot” domain to a custom domain
- You have successfully added “A Records” & CNAMEs and now in the next step you need to replace your domains nameservers with Namecheap’s nameservers.
How To Replace Your Domain’s Nameservers With Namecheap’s Nameservers
- Login to your domain’s hosting website. Note that your hosting Dashboard could be different from this.
- On your domain settings click “Manage Nameservers”.
- Choose “Use custom nameservers (enter below)”.
- In one of the above step we have asked you to copy Namecheap’s nameservers in a Notepad File. Now paste those 5 nameservers here. If you didn’t copy we have listed below. These nameservers are same for everyone.
- If there are already nameservers listed, replace them with these 5 nameservers.
- Click “Change Nameservers”.
- It will take sometime to Save Changes, so be patient.
After you click “Change Nameservers” it could show you only top 2 nameservers. Don’t worry about that all the 5 nameservers will be saved.
These are the 5 nameservers that you have to add:
- Now after some time test your naked domain, whether it redirects to “www” or not. Remember that sometimes nameservers take lot of hours to get updated, but most of the time they are updated within few minutes. You can verify whether your nameservers updated or not by “DNS checker” website. In the next step we will guide you how to check your nameservers propagation.
- Test your domain in three different ways like: “example.com”, “http://example.com”, “https://example.com”.
- All these naked domains must redirect to “https://www.example.com”. If they redirect to “www” means you have setup naked redirect successfully.
How To Check Nameservers Updated Or Not
- DNS Checker is a tool that tells you whether your website is propagated worldwide or not. We will use this tool to check whether the nameservers have been updated worldwide or not.
- Go to DNS Checker.
- Enter your domain name WITHOUT “www” like “example.com”
- Choose NS. NS means Nameservers.
- You can see that all of the 5 Nameservers have been updated worldwide.
How To Fix, “This Site Can’t Be Reached” Error
Often when you setup a naked redirect or change nameservers of your website you might get an error on your Chrome browser like “This site can’t be reached. Www.example.com’s server IP address could not be found. DNS_PROBE_FINISHED_NXDOMAIN”.
And on Mozilla Firefox you might get “Hmm. We’re having trouble finding that site”. We can’t connect to the server at www.example.com”.
So don’t get panic your website is not down, this error is only on your computer’s browsers. You need to add “Google Public DNS IP addresses” to your IPv4 Properties. Remember that it is not necessary that you will get this error. In case if you get this error, solution is here.
If you like this post then don’t forget to share with people. Share your feedback in the comments section below.
- Hire Best Blogger Template/Website Developers | Customize, Develop & Fix Blogger Template
- How To Display Google Ads On Blogger – Step By Step | Monetize A Blogger Blog | Earn Online
- How To Fix Valuable Inventory: No Content Google Adsense Error | Google Adsense Approval
- Complete Blogger/Blogspot Tutorials – Step By Step | Widgets, SEO, Monetization, Conditional Tags