Site move 301 redirect in Apache

I moved this site from the domain forevergeeks.com to ittutorials.net a few weeks ago because I think the latter domain makes more sense for the type of content I publish here. The concerned I had about the move was that I’ve been using forevergeeks.com for a long time ( almost 10 years ) so there are many links and people that would get cut off if I did the move without implementing a redirect. I didn’t want that to happen, I wanted a seamless transition from the old domain to the new one  without breaking any link or cutting people off when they type in the URL directly.

Apache 301 redirect

After researching a little bit I found out that In Apache is actually very simple to do a domain change without breaking anything! You just have to add these two lines of code at the top of your .htaccess file on the web directory of the site name you want to move from:

RewriteEngine on
RewriteRule ^(.*)$ http://newdomainurl.com/$1 [R=301,L]

That will actually redirect your entire website domain to the new domain, as simple as that. The process is pretty much irreversible, or a least hard to reverse once you’ve done it, so make sure you are all set to do the move when you put that code in your .htaccess file.

If you are only changing the domain name of your site, then that redirect above should take care of it, but if you are changing the permalinks structure as well, then the process gets a little bit more complicated.  I use WordPress for this site, and I changed the permalinks from %postname% to %category%%postname%  and I used this plugin to accomplish that. it does the job beautifully.

Notifying Google about move

After you are done with all the redirects it would be helpful to tell Google and Bing about the site move. To do that, login to your Google webmaster tool panel and click on the small wrench icon on the right side corner and then click on Change of Address:

image

Follow the wizard to guide you through the process of changing URLs. Its pretty straightforward.

Notifying Bing about move

Login to your Bing Webmaster Tool panel, and then  under Diagnostics & Tools click on Site Move:

image

Follow the step by step instructions on how to change the URLs.

Conclusion

Will traffic to your site be affected with this site move? Yes, mostly search engine traffic will be affected. I noticed Bing was quicker to pick up the changes than Google, but from what I read online, all sites are different when doing 301 redirects, so your experience might be different than mine when you do it.