Using the Redirection Plugin
Sorry that I neglected this series! I’m coming back to it now. I was getting into Web 2.0 with a lot of my posts, and I forgot that one of the main niches of my blog is SEO. This post is mostly on using the redirection plugin (there’s a download link if you click Learn more…).
Redirection Plugin
The third article in the Full Guide to WordPress SEO is on the redirection plugin for WordPress. The redirection plugin allows you to handle different redirects. Please note that your must be using WordPress 2.7 for this plugin to work correctly.
The best part of the redirection plugin is that it doesn’t require a modified .htaccess to function. It implements all of it’s redirects through WordPress.
Installing the Plugin
Installing the plugin is the same as installing any other plugin. You can download the plugin here. Just unzip the plugin in your /wp-content/plugins/ folder.
Setting up WWWs
The first thing that you can do with the redirection plugin is set up your WWW settings. You should have already choosen a primary domain (when you installed WordPress). I choose http://gulati.info over http://www.gulati.info. Having both the main domain (gulati.info) and the subdomain (www.gulati.info) is a bad SEO practice. You can use the redirect plugin to redirect all of the hits on your subdomain to your main domain, or vice versa.
Go into the Redirection menu (it’s under Tools on the left). This will bring you to the main redirect page. You will see the navigation across the page somewhere (usually at the top, or under some text). It will look like this: Redirects | Groups | Modules | Log | Options. To set up the WWW settings, you want the Modules Tab. After you click the module tab, you will see three gray boxes. They should be titled WordPress, Apache, and 404s Errors. We want the WordPress box. Click Edit in the WordPress box and a few dropdowns will appear. Here we can set up the WWW settings or other settings. Next to Canonical, select either Strip WWW or Force WWW, depending on what you picked for a domain. Please note: If you pick two different settings, example your WordPress domain is http://www.gulati.info, but you pick Strip-WWW, it will create a redirect loop. You will not be able to access your blog until you fix this (you can still access the admin panel.) While you are on this page, you should probably set up Strip Index. Normally, you can access the index of my blog at http://gulati.info or http://gulati.info/index.php. Both of these pages are identical, so for good SEO you would want to set http://gulati.info/index.php to redirect to http://gulati.info. Next to Strip Index select Strip index files (html, php, asp). Your current setup should look like this:

This is the suggested setup for the WordPress module.
If you are using Force WWW, that will obviously be different.
Setting up Modified Posts
The next thing you need to do with the redirection plugin is set up (well actually, you don’t have to) the modified posts redirection. Modified posts redirection is automatically enabled when the plugin is installed. This is probably the most important redirection that this plugin provides. If I create a post with a URL of http://gulati.info/2009/01/cakephp-speed-up-developmen/, and then, after time, notice the spelling mistake and change the URL to http://gulati.info/2009/01/cakephp-speed-up-development/, a problem is created. Instead of making the original URL a dead URL, the redirection plugin can make it redirect to the new post. The redirection functions fine without any settings change, but you can choose to monitor the redirects.

You can enable URL Monitoring to view statistics of redirects.
To do this, head over to the Options tab and then scroll down to URL Monitoring. Select Modified Posts for both selects, and then hit Submit.
You can now view statistics and a log of redirects. Head over to the Groups tab and look at the line titled Modified Posts. It’s probably empty at the moment, but it will show the number of modified posts later. It will also give you a total number of redirects and a list of the redirects done.
All finished!
Your redirect plugin is now ready to go! Hopefully this will improve your WordPress SEO a little (remember, it’s the little things that help!). I will go over another plugin soon! I’ve been writing about Web 2.0 a lot recently, but I want to get back to SEO.
Still having trouble? Please please please leave a comment. :) I’m happy to help!










Comments:
Hi guys,
I just read an article recommending to change the permlink to /%postname%
Here is the exact quote from the article
************
If you were using any other permalink structure than the default you will need to install your choice of plugin to redirect any of your indexed pages to the new location. My preference is Redirection which is also developed by the good folk at UrbanGiraffe.com. If you decide to use redirection, install it, activate it, and under Manage > Redirection > Options, ensure that both URL Monitoring select boxes are set to “Modified posts”. You will now have perfectly optimized permalinks without having to do anything else, or worry about duplicate content issues or 404 errors that could lead to search engine penalties.
********
So I downloaded the “Redirection” plugin and now I don’t know if I am coming or going, could you help me with the setup, the article made it look so simple but I found out that there is a million options to choose form.
I had my permlink set up to (Day and Name)
http://www.recipetrezor.com/2009/09/26/sample-post/
and my intention is to change to (Custom) /%postname%/
could you take me through a step by step how to set up this in Redirection.
Thank you
@RobertK
Try this:
Source URL: /(\d*)/(\d*)/(\d*)/([A-Za-z0-9-]*)(/)?
Target URL: /$4/
I’m hoping the re-direction plugin will solve my problems. As you have obviously looked into its working closely I’m prompted to ask two questions.
1) if I install the plugin should I get rid of the current .htaccess file a previous admin installed but which is not doing the full job?
2) will the plugin deal with the problem I have that the blog was once in a sub-directory /blog but is now in the root directory? (Google webmaster tools reports crawl errors from the old /blog configuration.
Thanking you in anticipation.
Hi Des,
1. It depends. You should definitely clean out any old redirects or rewrites that were there. There are a few things in the .htaccess that are necessary for WordPress, though.
It should look something like this:
2. Yep, that’s actually what it is for. You could do something like:
Source URL: /old-directory/*
Target URL: /
(make sure that the regular expression box is checked)
I redirect from
Old Link : /2009/05/postname.html
to
New : /postname/
Plz Help…What will be the Source URL & Target URL
Hi Debajyoti,
Try this:
Source URL: /(\d*)/(\d*)/([A-Za-z0-9-]*).html
Target URL: /$3/
@Austin your
Source URL: /(\d*)/(\d*)/(\d*)/([A-Za-z0-9-]*)(/)?
Target URL: /$4/
Worked great for me as well. Just wanted to thank you!
@Kristina
No problem! :) Glad that I could help.
@Austin — the Kink of Regex here ;)
I have another problem that you might help me to solve in just seconds. I use the Language Switcher plugin and recently I had to change my URL syntax from this:
^/lang/en/
to this
^/?lang=en
Just the end of the line has to be changed in the URL. All the beginning — letters, digits, slashes and hyphens — remains the same. However, I don’t know how to write this since there are no $ variable. Maybe I could make language codes (en, fr, …) appear as variables.
Would you please kindly suggest a solution ?
@Christian
Hm. I think that you are going to have to use multiple redirects to cover this.
So that string appears at the end of the URL? Ex:
http://gulati.info/2009/01/using-redirection-plugin-wordpress/lang/en
=>
http://gulati.info/2009/01/using-redirection-plugin-wordpress/?lang=en
Is that the change that you want? You will need a redirect to cover each of the different URL possibilies (ex: the home page, a blog post, etc). A regex could possibly be written that covers all of them, but I’m not good enough with regexes to write it. What is your permalink structure? With that I can give you a list of redirects to add.
I am hoping you can help me. I moved my WordPress files from one domain to another and changed the permalinks. So on the new domain any internal links in posts are broken.
I am trying to change:
http://olddomain.com/year/month/day/posttitle
to
http://newdomain.com/posttitle
Can anyone help with this please?
Hi Lori,
Try this:
Source URL: /(\d*)/(\d*)/(\d*)/([A-Za-z0-9-]*)
Target URL: http://newdomain.com/$3
Be sure that you put this on WordPress that is running on the old domain! If you put it on the new domain it won’t do anything. What is your exact situation? Do you have the domains with two different directories/servers, sharing the same directory, the old one isn’t pointed at anything, etc?
Hi,
could someone help me?
I want to redirect f.e.
http://www.3dtvmagazine.nl/2010/01/sony-xx/comments
to
http://www.3dtvmagazine.nl/2010/01/sony-xx/#comments
And this for all posts
Thanks
I have two questions:
1. are we supposed to select a module (i.e., wordpress or apache)? If so do we just delete the module not selected?
2.I want to redirect all posts from: /%category%/%postname%/
to
/%postname%/
Will the URL Monitoring do this automatically when I change the permalink setting or do I need to use a code in the redirection source and target url? If so what code should I use?
Thanks in advance.
Hi Martijn,
Here’s a redirection that should work for you:
Source URL: /(\d*)/(\d*)/([A-Za-z9-0-]*)/comments
Target URL: /$1/$2/$3/#comments
Thanks for commenting!
——————
Hi Nancy,
When you click on ‘Redirection’ on the left bar to get to the plugin, it brings you to the page for the WordPress module and Redirections group. You should make redirections here although I don’t think that it really matters where they are. I wouldn’t delete any modules, though.
It might automatically redirect and it might not. Some people report that it do and some report that it doesn’t. If it doesn’t, try this:
Source URL: /([A-Za-z9-0-])/([A-Za-z9-0-])/
Target URL: /$2/
Thanks for commenting!
im having troubles with the “modified post” stuff.
i changed some categories from
wordpress/category1/post1
to
wordpress/category2/post2
wordpress did it perfectly, in the blog i can see now the links to category2
but when i click the link, redirection corrects it and becomes again category1. What can i do?
Hi all – this plugin looks like it could solve my problems but I’m too dense to work it out. Plus I’m not a coder so don’t dive into the backend of seo, etc.
Anyway, I simply need to be able to redirect
DomainName .com
to
www. DomainName .com
(spaces added in) for everything that is on the site. Will this plugin do that and if so how please?
Trackbacks: