Domain redirection

If you have changed your website domain, you will need to redirect people who are trying to access the old domain to the new domain.

This page is about domain redirection. For information on individual page redirection check out our webpage redirection tutorial.

Code to redirect from one domain to another:
Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)$$1 [R=301,L]

Place the above code into your .htaccess file. Replace with the domain that your visitors should be redirected to.

The above code assumes the same directory structure and filenames on your new domain as on your old domain. So for example, if your old domain was and your new domain is, if you try to access the redirect will send you to the exact same location on

NOTE: Other sites on the web probably have links back to your old domain. Find out which sites link back to you, get in contact with them and ask them to change their links to point to your new domain.

NOTE: If you're going to do a domain redirection, place the .htaccess file in the root directory of your web server for your old domain. This way all the pages on the old domain will be redirected to the right place on the new domain.

NOTE: This redirection scheme only works on web servers that run Linux AND have the mod-rewrite module enabled for Apache.

© Copyright 2013-2014
Terms of use | Privacy policy | Copyright information