A Word Of Warning About Addon Domains
This is going to be somewhat of a short post.
Recently I added a domain as an addon domain to another related domain in cPanel and came across a slight SEO problem which many will probably already be aware of.
The domain acted as if the content belongs to it and sent back a 200 OK header message. the outcome of this as that it started to replace the pages for the main domain. Google saw that the pages were duplicate content and dropped the duplicate from 1 of the domains and unfortunately it decided to drop them from my main domain.
To stop this happening is simple. If running apache place the following in a .htaccess file in the root web accessible folder:-
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?addon_domain.com [NC]
RewriteRule ^(.*)$ http://www.main_domain.com/$1 [L,R=301]
Ensure that you change addon_domain.com to the actual addon domain that you are going to point to your main domain. Also change www.main_domain.com to the domain you wish to be used.
This will do 3 things, it will show in the browser that it is using the old domain and more importantly it will send Google a 301 redirect header. Search engines will not index pages that use a 301 redirect. It will also ensure that it sends the query string (if 1 existed) to the main domain.
You can also use this if you change the domain name that you are using (of course the old domain would need to still be pointing to the correct account). And the SERP’s results should carry over to your new domain if you had any (it will at least speed up the process).
Hopefully this will help stop someone make the silly mistake that I made.