How do you 301 redirect in WordPress?
Today I was racking my brains on how you actually to do a 301 redirect in WordPress. I’m good with technology but I’m not a web developer, and there are a lot of great blog posts about doing 301 redirects.
However, most developers actually forget they are writing for a wider audience! Remember techies, not everyone is a PHP guru or understands coding language. Take a kind tip for me you need to make it simple for us mere mortals “copy and paste this code exactly here”, that’s the kind of input I need.
Joking aside, I thought I’d give online marketing professionals like myself a leg up with this one.
The best 301 redirect plugin for WordPress
It’s a WordPress plugin that allows you to manage 301 redirections and keep track of 404 errors.
It can help you sort out any loose ends your site may have. This plugin is particularly useful if you are moving pages from an old website, you are changing the directory of your WordPress installation, or you are changing the permalink structure of your WordPress site.
Here’s the link to the little beauty – Redirection: A 301 redirect WordPress plugin
You can find this on the Plugin search on WordPress if you don’t want to install it manually.
Failing that…
This is the manually method that works:
Singe Page Redirect 301 using the .htaccess file
To do this you will first need to create a file named .htaccess (this is not supported by Windows-based hosting) and place it on the root directory of your website, then just add the code below to the file. If you have installed WordPress on your hosting account you might already have a file called .htaccess in your root directory.
Do the following below, but replace it with your details. For the first bit ‘/oldpage.htm’ you do not need a http:// or the domain name in there. Just find the link to the old page e.g. /home.htm
Redirect 301 /oldpage.htm http://www.yourdomain.com/newpage.htm