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.
- 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:
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.

Twitter: dekokoblog
says:
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?
You can create a new .htaccess file
Thanks for sharing. I think this issue is very dangerous
thu thuat wordpress recently posted..Theme tuyệt đẹp cho wordpress
Twitter: xtreamloaded
says:
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 FORGOTTEN
A .htacess redirect rule should fix that. You can rewrite the one above or generate another here: http://www.htaccessredirect.net/index.php