Redirect Subdomain to Addon Domain to Avoid Duplicate Content on Google Search


The other day I ran some weird google search and saw something that looked rather scary – my sub domain which actually poited to my addon domain was indexed on Google search. Let me make this clear, doncaprio.com is an addon domain on 9jaclub.com. As you know, an addon domain is a subdomain using a custom domain name.

My hosting account is registered with 9jaclub.com and this is the main cPanel domain. I can create unlimited addon domains but when creating an addon domain, a subdomain is always created in the process.

This blog is actually doncaprio.9jaclub.com using doncaprio.com as custom domain. What most webmasters fail to know is that when your blog is available on both address, you can be penalized for having duplicate contents as both are treated as different blogs by google. Once you create an addon domain, you must redirect the original subdomain to the addon domain. If you fail to do this, you’ll have duplicate conetents and I tell you, it isn’t good for SEO.

How do I remove my subdomain from google search and redirect to addon domain

You only have to do a 301 redirect and when search engines reach your subdomain, they’ll understand it’s been permanently moved to the addon domain.

how to redirect subdomain to addon domain to avoid duplicate content on google search

- Log in to cPanel

- Navigate to our addon domain directory

- Edit your .htaccess file and in the very last line, add the piece of code below:

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTP_HOST} ^doncaprio.9jaclub.com$ [NC]
RewriteRule (.*) http://www.doncaprio.com/$1 [R=301,L]

</IfModule>

- Save the file and check your subdomain to see if it redirects or not.

- Be sure to change the following:

doncaprio.9jaclub.com – Change this to your original subdomain that points o the addon domain

www.doncaprio.com – Change this to your real addon domain

As time goes on, the subdomain will be removed from google index.

avatar
Don Caprio is a full time blogger / web designer living in Nigeria and apart from blogging, my other obsession is music. I'm a self-confessed Tupac fan, an iOS lover, an Android user, a Windows 8 power user, a writer with a 5-year old unfinished novel... and the list goes on and on. You can add me on Facebook, follow my updates on Twitter or add me to your circles on ! You can as well grab my feed and get updates through email.
avatar
avatar
avatar

Get free daily updates through email

Comments

  1. I checked my control panel but couldn’t locate the .htacess file. Please help cos I have two addons domain and there are showing in google
    Essien recently posted..How Will You Spend Your Ramadan Holiday?My Profile

  2. Thanks for sharing. I think this issue is very dangerous
    thu thuat wordpress recently posted..Theme tuyệt đẹp cho wordpressMy Profile

  3. DON pls can this rule redirect the whole web address to new domain for example can this redirect http://www.example.com/freebook to http://www.example2.com to the home page of http://www.example2.com because i changed the content of http://www.exmple.com/freebook hope you understand
    Everest recently posted..RESET AND UNLOCK YOUR MOBILE PHONE SECURITY CODE IF FORGOTTENMy Profile

Speak Your Mind

*

CommentLuv badge