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.