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\.)?
domain\.com
RewriteRule ^(.*)$ http://domain.com
/$1 [R=301,L]
  1. Edit the above so that domain, com, and domain.com 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

PHP settings and the .user.ini file

Most settings for PHP can be configured via a file called ".user.ini" as defined by the...

Increase PHP memory limit

If you need PHP's memory limit to be increased, please do the following: Create a file called...

Command to run a PHP Script via Cron

If you want to run a PHP script via cron, you would do the following command:...

Setting up a Let's Encrypt SSL (hsphere only) - Free SSL

Let's encrypt is a free SSL certificate that can be used on your website to secure logins for...

FTP over SSL (FTPS)

Our Linux servers require SSL/TLS for FTP connections -- otherwise known as FTP over SSL. ...