Change Domains But Keep Your Traffic – .htaccess 301s

Changing domains was a big decision. My biggest concern was being able to keep my user, RSS feed, and search engine traffic. Luckily, the power of the .htaccess file allowed me to do so:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://yournewdomain.com/$1 [R=301,L]

The above .htaccess file code, placed on the old domain, redirects the user to the same URL on the different domain.
Quick, easy, and functional.


Comments

  1. david

    One more note. I recommend keeping your old domain for at least a year. Make sure to give users and search engines time to update.


Be Heard!

Share your thoughts without being a jerk! And wrap your code in <code> tags, f00!

Name*:
Email*:
Website: