Google indexing my site as a full domain plus subdomain (Hosted as add-on domain)

Hey,

I have one main domain, lets say domain.com and then I have my other sites in subdirectories sub.domain.com and they with otherdomain.com

Google has otherdomain.com indexed fully, but it also has a duplicate listing/indexing with the site also showing up as otherdomain.domain.com

Can I stop this as I’m sure it isn’t helping having it indexed twice…

Thanks

JD,

Indeed! You will be penalized (and removed from their database) when the duplicate is detected.

I’m sure you’d rather have your otherdomain.com visited directly rather than via a subdirectory of domain.com so simply use a 301 redirect to make that happen, e.g.:

RewriteEngine on
RewriteCond %{HTTP_HOST} !www\\.otherdomain\\.com [NC]
RewriteRule .? http://www.otherdomain.com%{REQUEST_URI} [R=301,L]

Regards,

DK