NEW SUPPORT LINE (South Africa only): SMS your support request (FIRST WORD MUST BE SUPPORT) to 072 532 1530

Domain parking with 301 redirect

Posted in SEO on 2012-07-15

The Correct Way to Park Multiple Domains and Avoid Duplicate Content Problems

 
Avoid Duplicate Content | 301 Redirect So you've got a domain, like www.php-web-host.com, but you also have a second domain, like www.php-web-host.co.uk. They both need to point to the same web site, so you go into cpanel and create a parked domain (See this article to find out "how to create a parked domain"). Problem solved, both URLs now point to the same web site!

But, hold on.... You've heard that the search engines penalise you for the use of duplicate content and now you're afraid, and rightly so. The search engines in their fight against spam do not look kindly on duplicate content, that is, if you copy text as is from one site and put it into your own, google will likely already have the original content in its index and now will see that you've copied it and penalise your site by dropping your ranking

The problem is that now you have two separate domain names which look like two separate web sites, but with identical content. This is a duplicate content nightmare! But there is an easy way around.

301 Redirect to avoid duplicate content issues

In order not to be penalised with duplicate content, you should do a 301 redirect from the new domain name to the existing one. A 301 redirect refers to a specific reply code in the HTTP headers which the web server provides whenever a page is requested. A 301 HTTP header tells the requesting device that this page has permanently moved and then redirects to the new domain. So, what this means from the search engines point of view is that it will come to your parked domain, eg, www.php-web-host.co.uk, and the web server will say, "301, that sites been permanently moved to www.php-web-host.com" and then it will transfer the requesting device to the new domain automatically.
    
Using a 301 redirect, Google et al do not see two or more websites with the same content, they now see one single website with unique content available at 2 or 3 different URLs.
    

How to do a 301 redirect?

The best method of doing a 301 redirect is to put the redirect directive in your sites .htaccess file. A .htaccess file is a file which resides in the root directory of your web site and has some preprocessor instructions to the webserver, ie, these commands are processed BEFORE the web server send the page to the device requesting it. In other words, when a user to your site (including the search engines) type in www.php-web-host.co.uk, before the page is returned to that user, the .htacess file is checked. When the rule is encountered for the 301 redirect, the webserver does the redirect and sends the new page and notifies the requestor that the page has moved.
    
The .htaccess file can have some very complicated rules and you should approach with caution. Please make sure to create a backup copy of your .htaccess file before you make any changes. Worst case scenario, if you make a mess of this file, your site could stop working! Replace the messed version with the backup copy and things will back to normal.
    
Ok, so here is our .htaccess file to redirect our co.uk domain to our .com domain:
 

RewriteEngine On

	RewriteCond %{HTTP_HOST} ^php-web-host.co.uk

	RewriteRule (.*) http://www.php-web-host.com/$1 [R=301,L]

	
	RewriteCond %{HTTP_HOST} www.php-web-host.co.uk

	RewriteRule (.*) http://www.php-web-host.com/$1 [R=301,L]

The first line, RewriteEngine On initialises the functionality on the server (so to speak).

Then we encounter RewriteCond .... This tells the server the condition, ie, if you see this then take the action in the next line.
    
The next line, RewriteRule, is the action to take.

We then repeat the condition and rule lines, but notices the difference:

RewriteCond %{HTTP_HOST} ^php-web-host.co.uk
RewriteCond %{HTTP_HOST} www.php-web-host.co.uk

In the first instance, we are redirecting in the users types in http://php-web-host.co.uk and in the second instance we are redirecting if the user types in http://www.php-web-host.co.uk (without and with the www).

To a computer, a website with and without the www may look like 2 separate sites, so we redirect to a single site. We prefer the www version, but that is personal choice.

now load this .htaccess back to the server and test it!

 

 

Comments

Name:Karen
 
Comment:
Thanks for this great info. It was clearly explained and really helpful. I just wonder how I can test this. The additional domains were already parked so they did redirect. They are still redirecting ok but how can I test that the code is doing its job (apart from seeing if our rankings go down or not!) Thanks

Name:PHP-Web-Host.com
 
Comment:
Hi Karen

That's a great question. I've compiled a short blog post to show you how you can test your 301 permanent redirect to make sure its working properly. Testing your 301 permanent redirect

Add your comment

Display Name:
Web Address:
Email Address: (not displayed)

Comment

SSL Certificate Authority Paypal Verified We accept PayPal

 
 
  © Free, easy content management system
HOME | WEB DEVELOPMENT | WEB HOSTING | SOFTWARE | RESELLERS | SEO | GENERAL | AFFILIATES | RESELLER 50GB | RESELLER 100GB | RESELLER 150GB | RESELLER 200GB | VPS