The Best Way To Set Up Redirects In Your WordPress Blog - ManageWP

The Best Way To Set Up Redirects In Your WordPress Blog

The Best Way To Set Up Redirects In Your WordPress Blog

There are 101 reasons why you might need to redirect one URL to another, but it is not a feature that comes as standard in WordPress. Fortunately, there are quite a few plugins out there that can handle URL redirects for you. I know, because I have used a lot of them. Some very simple, some rather complicated. But in my opinion, by far the best redirection plugin available is the aptly named Redirection.

There is just one problem – compared to other less complicated redirection plugins, Redirection can seem rather overwhelming. Whilst you can use something like the simple Quick Page/Post Redirect Plugin, you would be far better off installing its bigger brother and taking a few minutes to better understand how it can better serve you.

Setting Up Redirects

Once you have installed and activated Redirection, you can access the plugin’s screens by hovering over the Tools option in your sidebar and selecting the appropriate option.

You will then be presented with the Add New Redirection screen:

Add New Redirection

There are a few potentially confusing options here, but don’t worry – if you just want to set up a simple redirect, you don’t need to do anything out of the ordinary. Just enter the URL for which you want to set up the redirect in the “Source URL” box, and the destination URL in the “Target URL” box. Hit “Add Redirection”, and you’re all set! That’s all there is to it.

Here’s a little tip to save you time – you do not need to enter your site’s domain in the “Source URL” box – just the extension. Let’s say your site was “http://www.mysite.com/” and you wanted to redirect the URL: “http://www.mysite.com/myurl/”. In order to set up the redirect, you only need to type in “/myurl/” in the “Source URL” box – the plugin will do the rest for you.

Groups

If you are going to be doing lots of redirects, it would be advisable to group them by type.

For instance, let’s say I wanted to create some URLs to mask affiliate links on my site (so that when my visitors hovered over a link, they saw “http://www.mysite.com/recommends/product/” rather than “http://www.affiliatesite.com/youraffiliateid”). It would make little sense to have these redirects bunched in with other unrelated ones. So I should set up a group for my affiliate links.

First, click on “Groups” from any of the plugin’s screens:

Groups

On the resultant screen, you can add and manage your groups. Using the example above, let’s type in “Affiliate Links” in the add groups box, and hit “Add”. The group is then listed on the page:

Affiliate Links

To add redirects to a specific group, just click on it and then enter redirections as normal in the subsequent screen.

Fix 404s With Ease

You know that we’ve been going 404 error crazy on the blog here recently, and with good reason – no one likes seeing them. But fear not – Redirection has an excellent feature that logs 404 errors:

404 Error Log

Setting up a redirect from one of these 404 errors to the intended page is just as simple as clicking the green plus icon to the right of the link, and then entering the target URL.

If you want to set a particular 404 error so that it is ignored in the future, just add the URL as a redirect and select “Do nothing” from the “Action” drop down box. It would be a good idea to keep all such redirects in an appropriately named group.

Click Tracking

There are many reasons why you might like to keep track of clicks on a particular link, and Redirection has a built-in ability to do so – even for URLs that you do not wish to redirect.

Say you wanted to track how many times your visitors visited a specific external website linked to from your blog. All you would need to do is add the website in question as a Source URL as you would do for any redirect, but then select “Do nothing” from the “Action” drop down box (as you did above for ignoring 404 errors). The URL will show up as a redirect, and you will be able to see the number of times it has been clicked to the right of your screen. You can even click on the URL to give it a name:

Click Tracking

Speed

Making sure that your site doesn’t get bogged down by plugins should always be a key priority. With that in mind, there are three things you should pay attention to regarding Redirection, which are found in the Options screen:

Logging

If you do not need to log redirect or 404 requests, uncheck these boxes. In all honesty, I don’t believe that keeping these boxes checked will have a major impact on most blogs. What you should however make a change to is the log expiry option found just below. If you leave the option set to zero, data will be collected indefinitely. Far better to keep things a bit more manageable – I would suggest you set items in the log to expire after 30 days.

Tip: Learn about asynchronous plugins to improve page speed

Further Reading

Redirection is capable of doing even more than what I have outlined above. If you are not afraid of getting your hands a little dirty, check out the pretty comprehensive user documentation that the plugin’s developer published here.

Download Redirection here.

Tom Ewer

Tom Ewer is the founder of WordCandy.co. He has been a huge fan of WordPress since he first laid eyes on it, and has been writing educational and informative content for WordPress users since 2011. When he's not working, you're likely to find him outdoors somewhere – as far away from a screen as possible!

91 Comments

  1. Kanak Mehra

    Very informative post, Tom. I loved especially how you explained the way to setup redirects in WordPress. I never used this method. Thanks for explaining it to me.

  2. Ali Sajjad

    Hi TOM,
    Very nice and helpful article on wordpress redirects. i want some bit more help about redirection.
    I have a blog for wrestling and now i want that what a user click on download link or view online link inside the post,
    wordpress redirects to a custom html page, which designed for only displaying iframe video box to view online and some ads.
    what should i do?

  3. David

    I don’t know much about 404 error pages because I had started my blogging career recently.

    But somewhere I read that If any blogger or writer deleted the existing web page then the URL of that web page becomes 404 URL and that page becomes 404 page.

    It is also said that Google don’t like 404 page so I checked my site whether I had any 404 page or not then I found few of the 404 error pages on my site also.

    But Now after reading this post, I can easily handle these pages.

    Thanks for sharing such a helpful post with us. 😀

  4. Ruang Sehat

    Hi Tom, thanks for your useful tips. I just want to ask if I have subdomain and I have deleted it. Now I want to redirect all of subdomain url just from httaccess. Can I? and how the code I must write? Thanks

  5. Kama

    Aha!! finally I found a great redirect plugin instead of using a shortcode for my web. Thanks for the help.

  6. Kristopher

    Thanks for your post. I was having trouble with my redirections, but now they’re up and working just fine!

  7. project

    Hi
    thanks for sharing this, but I think this kind of plugins increase the server load time and resource usage especially on shared hostings

  8. Aanya Rajput

    Thanks for the detailed information about the Redirection plugin but I am in a trouble right now as for one of my blog I had mistakenly redirect the wrong url and then delete it from the redirection but still it is redirecting that url to the new one. Now my question is how to bring it back to normal.

    1. John

      Did your site return to normal Aanya? I find that most of the time this kind of “problem” is due to caching. Try deleting your wordpress cache (clearing it, or whatever the terminology is for your specific caching plugin). Also try clearing your browser cache by deleting your browser history, then try again.

      If none of that works it might help to deactivate the plugin to see if that brings things back to normal

  9. Andrew @ Forever Formula

    Thanks! I needed the ability to redirect and track how many hits were passed through. This was very helpful.

    Andrew.

  10. Elrond Burrell

    This rescued me this morning from my own mistyped URL in an email newsletter, thanks so much!

  11. Srp

    Thanks for this, Is it possible to redirect from unused deleted website page to new website page using these redirect plugins.

  12. Ron Richardson

    We’ve moved from a non-wordpress site that’s pure php to WordPress. I want to redirect files like: http://same-domain.com/contact.php to http://same-domain.com/contact/

    Will this plugin do that? I’ve tried a few but still get 404’s. If not, then ?

  13. Gung

    Wow.. finally I could make the redirect url with redirection plugin. Nice post! Thank you.

  14. Dawid Ziółkowski

    Good article, but what do you think about SEO Redirection Plugin (https://wordpress.org/plugins/seo-redirection/)? I tested it on a few of my sites after changing the domain and CMS (form other to WordPress) and it worked very well. It’s similar to Redirection plugin (you can set rules, handle 404 errors, keep logs etc), it’s under active development and has nice interface.

  15. Satpal Singh Kajla

    Thank you very much. I don’t know much about coding therefore it’s treasure for me. Thanks a lot.

  16. Will Franco

    Watch out with the Redirection plugin though!

    a. Issue with and without trialing /

    b. Currently, I have to setup two redirects per URL

    ​If I don’t the URL that’s not setup in redirection will 404.​

    source: http://www.yourwebsite.com/thank-you-page/
    target: http://www.yourwebsite.com/swvd/

    if the url is http://www.yourwebsite.com/thank-you-page
    i.e. without the trailing slash it 404’s

    the bug is easy to miss!

    and the plugin documentation doesn’t specific you actually need to create two redirects per one.

    if you visit the target page by clicking the source first it will work

    and then if you visit the non-trailing slash it will work

    you have the visit the non-trailing slash first to get the 404 (i.e. like a visitor of your site)

    and it seems nobody is talking about this either.

  17. led lampen

    Well done Tom! Great Post!

  18. Hollywood Movies

    Nice All Web Master Useful Posts And Site Like

  19. Breedstraler

    Very useful post!
    Thank you

  20. Hannah Ransom

    I got this plugin a while back and I also love it. Problem is, now I just made my landing page into a separate “landing site” and the plugin won’t redirect to a different domain :(

    OR, do I just not know how to use this feature. Please let me know if you have any idea how to do that.

  21. Mary

    I am wondering about page rank and Google listing following with the redirect. I have been writing for 3 1/2 years and moving to a new domain, I don’t want to lose all that good google stuff I have earned. Will every single page and post follow? And what about RSS feed, will it follow too? Thanks for the help!

  22. kieron

    Hi there TOM, many thanks for your great instructions. My url is being redirected without any hassles. NICE ONE! its been really hard finding a plugin that just does the job without the bollocks!

    Thanks ive bookmarked you, regards k

  23. Gerry Anderson

    Well done Tom! This worked very well to solve our redirect issues. You did a great job of education. How can I give back to you for this help? I really appreciate it.

    1. Tom

      Thanks!

  24. Ryan

    Maybe I misunderstood what you said, but you can redirect in WordPress with just a few lines of code at the top of the page you want the redirect on:

    <?php if(! is_user_logged_in()) {
    wp_redirect( home_url() );
    exit;
    }

    Why everybody use plugins for everything when most of this stuff is in the WP core API.

  25. Jody Heath

    Sorry for the double posting. Just to clarify (although you probably read b/w the lines), in the previous question, I was referring to only the category of redirection plugins.

    2nd question, in terms of duplicate content, once we’ve changed an old url, do we need to go into Google webmaster and request them to un-index the old url which we just redirected?

    Thanks!

    1. Tom Ewer

      Hi Jody,

      To be honest, since I wrote this article I haven’t used any other plugin with the same functionality, so I’d have to say it’s still my pick!

      You don’t need to request that old URLs are de-indexed. Google will figure it out.

      Cheers,

      Tom

  26. Jody Heath

    Hi Tom,

    So it’s been a little while since you wrote this post. Would you still say “redirection” is your top pick for plugins?

  27. Arafin Rubab

    Great tips.
    I have done my url redirection by using your tips.
    Thanks a lot for sharing. Keep it up.

  28. PrIyAnGsHu

    Hey Tom, I’m looking to redirect my whole WordPress blog to another domain. Actually, I have set up my current site on a new domain and I want to redirect the current domain to the new one, probably a 301 permanent redirection. Is doing a 301 redirection through .htaccess file, the right way to redirect a WordPress site to another URL? Or is there any other better way?

    1. Tom Ewer

      There is more than one way to do it, but setting up a 301 redirection via your .htaccess file is definitely a valid method, as far as I am concerned.

  29. Don

    Hey Tom. Great article as your directions seem pretty clear, but I’m mystified that I’m still having a problem.

    I’m trying to create a landing page for a print ad. All I’m trying to do is have a user type in “domain.com/gelpens” into a browser and be redirected to the landing page. Strangely I’ve followed your directions to a T and I’m getting this error:

    Not Found
    The requested URL /gelpens was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I’m not entirely sure what I’m doing wrong here. Thanks in advance.

  30. Steve

    I want to redirect all pages beginning with /news/ to the /News/ page but I cant work out how to do a wildcard equivalent to *

    1. Tom Ewer

      I’m not sure I follow — as far as I am aware, URLs are not case sensitive…

      1. Daniel Friesen

        Domain names and protocols (http) are not case sensitive, ports are non negative integral numbers, …

        Everything else in a URL is case sensitive, unless the backend decides to treat it as case insensitive.

  31. Srjtech

    Tom, do you have a bit more list of plugins meant for just affiliate tracking, because I’ve been using the redirection plugin for some time and now I had to remove it because of server issues. Is there any plugin where I can export the data?

    1. Tom Ewer

      Hi there,

      Funny you should ask — I’m planning on doing an article in the future on how to use .htaccess to manage your redirects. Stay tuned!

      Cheers,

      Tom

  32. Line Hostmalingen

    Thanks Tom, a useful tip of the day! (some days later 😉

    1. Tom Ewer

      My pleasure Line :-)

  33. Nikhil

    This Plugin has been officially closed by WordPress due to multiple Security Vulnerabilities reported by me. Please DO NOT use this plugin any further. Also it is removed from downloads. Also there are 2 more plugin that is removed see here https://twitter.com/niksthehacker/status/385485630534189057/photo/1

    1. Tom Ewer

      Hi Nikil,

      It appears to still be on WordPress.org with no news of any major issues. Care to explain further?

      Cheers,

      Tom

      1. Nikhil

        They told me that they have closed but now they patched the issue reported by me in 2.3.3 and launched 2.3.4; no issues i have done my work for community. bad thing is they didnt mention me :(

  34. Chris

    Great article, thanks so much! It also saved me from paying WordPress’ $13/year to do this same thing! =)

    1. Tom Ewer

      No problem Chris :-)

  35. Michael

    Great Post! I recently came across a premium plugin that does this with comments. Its called Comment Redirect (http://www.commentredirect.com) it also has a opt in pop-up to increase subscribers. If anyones interested in such a thing check it out its a very impressive redirect plugin.

  36. Mio

    Thanks to you, we installed Redirection for some quick and easy 301 redirects after we changed our permalink structure.

    Thank goodness because some of our most viewed posts were actually deadlinks after we switched our permalink structure.

  37. Nosa E Nosa

    Hey Tom,

    Thanks for the great post, I had already downloaded Quick Page/Post Redirect Plugin, but I decided to one last search and it lead me here.

    The Redirection plugin works like a charm. Thanks alot.

  38. Avtar Singh

    hi, nice post…but i want know that can we redirect 404 pages without using plugin..???

  39. Greg

    Hey Tom,

    Apologies for dragging up an old post, but is there anything else as powerful as Redirection on the market that is kept up to date? Like the commenters earlier in this post, I’m pretty concerned with the folks saying it has been buggy with the last few versions of WP.

    Any recommendations or confirmations the plugin still works would be greatly appreciated! :)

    1. Tom Ewer

      No problem Greg. I’ve had no problems with it, I also use Pretty Link but that doesn’t have exactly the same functionality. To be honest, it was last updated 5 months ago — I really don’t think that’s a big deal.

      1. Greg

        Sorry for my delayed reply Tom – for some reason I never got an email about your reply.

        All I can do is give Redirection a try. It seems to be the most powerful plugin out there for what I’m trying to do.

        You say 5 months since last update. Were you referring to Redirection or Pretty Link? From the Redirection plugins page the last update was listed as 2012-May-07.

        I’ll see how I get on. There are a few concerning comments in the support and reviews section, but I will soon see for myself!

        Thanks for the great article a (working) Redirection plugin is exactly what I was hunting for! :)

        1. Greg

          Actually, looks like there was a later version than the repository shows.

          This Redirection support post explains it:

          http://wordpress.org/support/topic/this-plugin-repo-does-not-show-the-latest-version

        2. dick

          Try Thirsty Affiliate plugin. Basic plugin is free. They have paid add-ons also.

          1. Tom Ewer

            Thanks for the suggestion Dick!

  40. Paul

    Hi.

    One thing that isn’t clear in all I’ve read about the Rediretion plugin….

    I set up a new WordPress blog. Imported a select number of posts from the old WordPress blog.

    When I setup redirection, do I do it once for the whole site, or do i have to enter each individual like per post?

    ie. Just http://www.mysite.com redirects to ‘mynewsite.com’

    Or do I have to add a 301 for each like

    http://www.mysite.com/post1 redirects to ‘mynewsite.com/post1′
    http://www.mysite.com/post2 redirects to ‘mynewsite.com/post2′
    http://www.mysite.com/post3 redirects to ‘mynewsite.com/post3′
    http://www.mysite.com/post4 redirects to ‘mynewsite.com/post4′
    etc.
    etc.?

    Can you clarify this?

    Ideally I just need to do one major redirect.

    Any insight is appreciated.

    1. Tom Ewer

      Hi Paul,

      I’m not sure I’m afraid — it’s not something I’ve dealt with before.

      Cheers,

      Tom

  41. Istiak Rayhan

    Hey Tom,
    Nice guide on redirection. I was not aware about making Group in Redirection Plugin.

  42. Robinson3d

    That is nice. But is there no way one can make the plugin redirect any of your web page that is showing 404 error pages automatically?

  43. Neeraj Bansal

    Will you please help me to get a plugin which will redirect 404 error page to randomly any post or to post which closely resembles to the search query.

    1. Tom Ewer

      I’m pretty sure there are plugins out there that can do that but I don’t know names off the top of my head…I would recommend a Google search :-)

      1. Neeraj Bansal

        Thanks for your precious time.

  44. Lasse

    Once Again, a very good guide from Tom! Explains many of my questions regarding redirecting in WordPress. Thanks Tom! :-)

    1. Tom Ewer

      No problem :-)

  45. Jeremy

    I was going to install this plugin based on your review, but was a little concerned that I should select a different plugin since Redirect hasn’t updated in 365 days and is out of date with the current WP version (which i’m using). Any thoughts? People still seem to be using it, but I worry there’s no more support or updates for it to keep up with WP changes.

    1. Tom Ewer

      You raise a valid concern Jeremy but ultimately it’s up you. If you’re looking for a more up-to-date equivalent then I highly recommend: http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/.

      Cheers!

      Tom

      1. Jeremy

        Ha, thanks Tom. I already ended up installing the one you just recommended. It seems to be working for what I need. Thanks for the follow up!

  46. Akiko

    Hi, I’m sorry that my question might sound really stupid, but would really appreciate some help. I’ve ‘moved’ my blogger to wordpress, except that I didn’t do any importing – I manually copied all my posts to wordpress. Now I’m trying to do a redirect, but realize that because I hadn’t done it by way of the normal ‘importing’, it seems that all the plugins won’t work for me. I can’t do the importing now, it’s taken me a long time to copy the posts and format everything on my new wordpress site. Are there any other options for me now? Hope you could help me with this, thank you very much!

    1. Tom Ewer

      Hello Akiko,

      I’m afraid I don’t really understand your question but it sounds pretty complicated, so I would advise that you use the WordPress.org forums.

      Cheers,

      Tom

      1. Akiko

        Hi Tom thanks for the reply. Have tried some coding methods and now my blogger blog has been marked as spam and deleted! Confusing I suppose. Anyway, thanks for the advice, I might do just that. Cheers!

  47. Niche Master

    I came to this page because I was looking for a reason why my website does a page redirect when i look at google page speed. Just wondering if anyone knows how to cache that?

  48. Jalyn

    This is the plugin that I am looking for. If I wish to redirect http://paauk-usa.org to http://paauk-usa.org/paauk_usa, I have to put ‘/’ in source and /paauk_usa/ in target field. Is it correct?

    I downloaded the plugin and I tested some redirection urls. Then I deleted all testing URLs. But it is still working even I had deleted. Then, I tried to uninstall plugin, it’s still working. Do I have to do something? How should I fix it?

    Thanks!

    1. Tom Ewer

      To be honest Jalyn, you’re best directing these kinds of questions directly to the plugin developer. They’ll be able to help far better than me!

  49. Nick

    Thanks for writing this article. I was able to redirect one of my pages for my baseball site to ESPN Standings.

    1. Tom Ewer

      My pleasure Nick :-)

  50. apps for mobile

    Hi Tom
    How i could use this plugin auto generate my aff link by php code?

    1. Tom Ewer

      I’m afraid I don’t understand the question…

      1. apps for mobile

        I mean, when i create a new post and have a custom field in wordpress for redirect. How i generate a redirect link when i click publish post with my meta field?

        1. Tom Ewer

          I’m afraid I don’t know — I haven’t used that feature.

  51. Optimator

    Great plugin, just what I was looking for. Thanks a lot!

  52. Barry Paul Price

    THanks! That works great!

  53. Randy Young

    Thanks for this, it got me exactly what I was looking for. Much more versatile than SimpleURL.

  54. Wine Dine

    Will give it a try. Looking for more of an automatic script, but this seems very precise.

  55. FreddFDR

    I need a redirection tool that will load another website and still open my own post. Is that really possible. Something like all this clicksor sort of?

    1. Tom Ewer

      I’m not aware of a plugin that can do that for you I’m afraid — it doesn’t really sound like you’re trying to do a redirect.

      1. Melanie Poteat

        Than what is something like this called? I am wanted to redirect any clicks from my old blog (www.snapsbypoteat.com/blog) to my new blog (www.melaniepoteat.com/blog)? Are you saying this isn’t possible?

        1. Tom Ewer

          That’s easily done with this plugin — Fredd was asking something else.

  56. Sherese Duncan

    Finally! I found the information I was looking for. You’re right, Redirection has many features that are great for tracking. Thanks for sharing.

    1. Tom Ewer

      No problem Sherese :)

  57. Phillip Bryan

    This was great – setting up redirection on my site was super simple. Thanks!

    1. Tom Ewer

      No problem at all Phillip!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Over 17,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!

Have questions? Get in touch!

Over 17,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!

Have questions? Get in touch!

Over 17,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!

Have questions? Get in touch!

Over 17,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!

Have questions? Get in touch!