Spread The Knowledge

How To Solve Problem Of Naked Domain Redirect

Mahesh Dhaka CEO at WEBHOBS

First, let me describe you the problem of naked domain. It’s a technical issue when your website URL example.com and www.example.com are resolved separately. Ideally either example.com should be main domain and www.example.com should redirect to example.com Or www.example.com should be main domain and example.com should be redirected to www.example.com. If it’s not happening in that case the search engine consider www.example.com and example.com as two different domains. Now, because the content is same at both the URL, The search engine assumes that one website is a copy of another website and in this situation both website loose the search engine ranking and that’s called the problem of naked domain. Millions of websites loosing their complete business due to this issue.

How to check whether you are facing naked domain issues

Checking for this problem is quite simple. Please follow these steps for checking naked domain issue:-

1. Type your domain into browser with www and note down the url when the web page is completely opened.

2. Type your domain into the browser without www and note down the url when the web page is completely opened.

3. Compare both the url if both are same in that case, congratulation you are not facing the naked domain issue, but if both have difference of www in that case naked domain issue is there and you bust have to resolve it, to improve your search engine presence.

Let’s Solve the naked domain issue

There are a number of ways to solve this issue. It depends on the situation and your programming skill that which way is better for you. I am here to describe all possible situations and their solution. These are as follows:-

1. You have full control over Cpanel:

In this situation login into your control panel and select X3 theme. Go to file manager and select show hidden files button. Look at the file manager that whether it have .htaccess file or not. If it doesn’t create a new file named as.htaccess and open it. Now write the following code into this file. When you want non www as the main domain

RewriteEngine on<br>
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]<br>
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

When you want www as the main domain

RewriteEngine on<br>
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]<br>
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301,NC]

2. You have no control over Cpanel:

This situation normally occurs when you joined some kind of reseller plan, so when you are a reseller of any company and they given you a fully branded website. In this case you don’t any control over.htaccess file. You have only control over html and css. However, normally the programmers of reseller design taken care that there will be no naked issue, still a lot companies have this issue. Now for resolving to follow these instructions:-

a. Buy Web Hosting from somewhere and point A record for yourdomain.com at this hosting package.

b. Point A record for www.yourdomain.com to your reseller website IP.

c. Now go to Control panel of the company from where you rent a hosting package and create .htaccess file.

d. Now write the same code given above into this file.

Now if someone type youdomain.com then particular will redirect to www.yourdomain.com and if someone type www.yourdomain.com then it will directly access your fully branded website.

Prefered naked domain redirection non www or www

I heard from some bloggers that we should always redirect non www to www. Actually, I have also seen that almost websites use www as the preferred version. However, I have no proof in favor of it not even against of it, but in my own opinion it doesn’t matter.

Comment Section

Who is Engineer

7 Secrets Of SEO To Improve Serp Ranking At Google

Using Microdata Can Boost Website SEO At Google

5 Common Reasons Of Startup Failure

How To Solve Problem Of Naked Domain Redirect

A 30 Thousand Dollar Project

8 Reasons why PHP is best programming language for the web development

The Smackdown b/w Node JS V/S PHP

6 Benefits Of Using PHP 7

How To Send Email Using PHP

Difference b/w PDO and MySQLi

How To Secure Cookies In PHP