Aliasing Domains with Proper SEO (domains and Search Engines)

Aliasing a domain to a primary domain is a great way to simplify domain hosting as only one main site has to be updated.  However, when aliasing a domain you need to consider SEO (Search Engine Optimization) because if a search engine sees the same content on two different domains, they can downrank it .  As such, it is best to use a rewrite such as the following in the .htaccess file. 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.)?
RewriteRule ^(.*)$
/$1 [R=301,L]
  1. Edit the above so that domain, com, and are the correct values. 
  2. Open the .htaccess file in the domain's directory via the file manager or on your computer
  3. Place the above in the .htaccess file, above any other rewrites that you may have
  4. Save the file to the server
  5. Test for any errors and using the alias domains to verify it is redirecting
  • 7 Users Found This Useful
Was this answer helpful?

Related Articles

How to create a .htaccess file

Creating a .htaccess is easier then it sounds. You can create an .htaccess file in any text...

How to add a domain / website for hosting

To add a domain for hosting, please do the following: Login to the control panel (please see...

How to create subdomains? (

To add a subdomain, please do the following: Login to the control panel -- please see...

Where do I upload files for the web site? (public_html)

Hsphere has a true separate domain setup and as such there isn't a central "public_html" folder...

How can I test my site before changing DNS? (instant aliases)

To test your site before changing the DNS nameservers, you can use the instant access alias that...