If you are using a webhost like 1&1, you may find that adding additional domains to your hosting package sets the default directory (the 'home' directory) as a subdirectory of the main site.

Imagine you have two sites:

  • www.abc.com
  • www.newsite.com

After adding the newsite.com entry to your list of domains the home directory may be set to www.abc.com/newsite/ - this will allow a user to browse to www.abc.com/newsite and access the new site.

Why is this a bad thing?

It's uncertain whether sites like google treat multiple domains pointing to content as a bad thing - there is some information out there, like here, but the situation isn't 100% clear.

The best situation is to have the content isolated properly, so that the new site we have created newsite.com cannot be browsed in this fashion.

There are two methods to resolve this issue: Set the home directory of the primary website to a subdirectory

  • Configure abc.com to have a home directory of /http_docs/abc.com (or similar)
  • Configure newsite.com to have a home directory of /http_docs/newsite.com (or similar)

1&1 have information on how to do this here.

Use a 301 .htaccess redirect

You'll need FTP access (or another way to access your websites files) to do this.

Create a file called .htaccess (or append your existing .htaccess file) Add the following lines (don't add the Options... and RewriteEngine... lines if they already exist): Options +FollowSymlinks RewriteEngine on RewriteCond %{http_host} !^www.newsite.com$ [nc] RewriteRule ^(.*)$ http://www.newsite.com/$1 [r=301,nc,L]

This will ensure that if the site is browsed to from a different location, your browser (and Google) will be redirected to the correct location.

You can find a whole load more information about 301 redirects here.

Previous Post Next Post