So you’ve purchased a ton of domains to park on your main account, but you don’t want Google to penalize you for having duplicate content.  And you know that you could go through your .htaccess file creating redirects for each and every one of the domains you’re parking.

As your .htaccess file grows and grows, you find yourself asking, “Isn’t there an easier way?”  Instead of the lines and lines of .htaccess redirects you could be using, how about these three?

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.YourDesiredDomain.com [NC]
RewriteRule ^(.*)$ http://www.YourDomain.com/$1 [R=301,L]


What this means in english:

  • Make sure we’ve got our rewrite tool enabled
  • If someone requests a page, and the domain is NOT my preferred domain
  • Redirect the user to my preferred domain, including the www I’ve specified here, please, and tell the browser the content should always point here.
in HTACCESS