≡ Menu

How to 301 Redirect WordPress Posts To New Domain

301 Redirect is considered as a permanent redirect compared to a 302 redirect which is temporary. Therefore when moving wordpress to a new domain, it is a good idea to redirect all the posts to the new domain.

This way all the search engine records will be kept intact and this means you won’t lose any traffics / hits to the website.

This doesn’t mean redirecting from fnode.com to nish.com, it will also redirect every single URL associated with fnode.com to nish.com.

For instance, if a user is looking for a particular post and goes to fnode.com, they will be redirected to the corresponding post on nish.com

Here is an example of one of the most popular post on the site…

http://www.fnode.com/2007/06/02/make-bisoncam-work-on-windows-vista/

When users clicks on the above link, they will be automatically redirect to

http://www.nish.com/2007/06/02/make-bisoncam-work-on-windows-vista/

This way, the user won’t notice the domain change because it is 99% directed via search engine or linked URL.

This method is also a good way to let GoogleBot to know that the domain has been moved permanently from fnode.com to nish.com

Here is the code below and I used which goes into the .htaccess file. All you got to do is to replace the URL to make it work with your own domain.


# BEGIN WordPress
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.fnode.com
RewriteRule (.*) http://www.nish.com/$1 [R=301,L]
# END WordPress

32 comments… add one

Leave a Comment

Next post:

Previous post:

Copyright © Nish Vamadevan 2002-2018. All Rights Reserved. Terms and Policies.