Skip to content

How to 301 Redirect WordPress Posts To New Domain

The 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

https://nish.com/blog/make-bisoncam-work-on-windows-vista/#Here is an example of one of the most popular post on the site…

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

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<br />
RewriteEngine On<br />
RewriteCond %{HTTP_HOST} ^www.fnode.com<br />
RewriteRule (.*) http://www.nish.com/$1 [R=301,L]<br />
# END WordPress<br />
comments powered by Disqus