Creating Redirects for WordPress (and the Best Plugins for the Job)

What do broken external links, organic search engine traffic to outdated content, and deleted pages that send visitors to a 404 dead-end all have in common?

Just another day at the office, right? Hopefully not. These sort of problems don’t have to stick around in the WordPress world because what they have in common is that they can all be fixed with redirection.

However, redirection has to be properly implemented. Do it wrong and redirection can hurt both user experience and organic search traffic. Do it right and redirection enhances UX by delivering the right content, and has a negligible or even positive effect on search engine results page (SERP) rank.

Note: If you’re still having trouble logging in after reading this post, let us help! Our awesome support team can help you with any WordPress issue, big or small – and for free! It doesn’t matter what time it is or whether it’s the weekend, our team is available 24/7.

Et Tu, WPMU DEV?

You’re shocked, aren’t you? You can’t believe that I’m about to recommend one of those annoying notices that says “In 5 seconds you’ll be redirected” and then proceeds to hijack your browser.

Well, good. I’m glad you’re shocked at the suggestion.

That’s a horrible practice that should’ve been abandoned years ago and I’d never tell you to do that. While that sort of technique is technically a type of redirection, that’s not what I’m talking about.

Redirection should happen on the server out of the visitor’s view, and should be designed to improve user experience.

Proper redirection works like this:

  • A website visitor clicks on a link or types in a URL.
  • The server looks at the link and returns a message that says (in effect): “That page is out of date, deleted, or temporarily unavailable. Try this page instead.”
  • The user’s browser gives it another go with the new URL recommended by the server and receives a page that is current and not a 404 page.

Proper redirection happens seemlessly and delivers the content the user expects to see.

Types of Redirects

There are three types of common redirects:

  • 301 permanent server redirects,
  • 302 temporary server redirects, and
  • Meta refresh browser redirects.

307 redirects were also once common. However, they are basically interchangeable with 302 redirects and some search engines don’t really understand 307 redirects. So you’re better off using a 302 redirect rather than a 307.

301 or: “That Page is Gone, Use This One Instead”

301 redirects are the right type of redirection to implement in the vast majority of cases.

A 301 redirect tells visitor browsers and search engine web crawlers that the requested URL has been permanently redirected to a new location.

When a search engine sees a 301 they remove the original URL from their index and replace it with the new URL. In addition, search engines pass link juice from the old URL to the new URL. This means that the new URL will appear more or less right where the old URL appeared in SERPs, assuming it contains similar content.

Let’s consider some scenarios where a 301 is the proper choice.

Say you wrote a post several years ago that is now badly outdated. Rather than remove that post — and lose any traffic it’s generating — you could write an updated post and use a 301 redirect to push traffic from the old post to the new post.

Another scenario where a 301 is appropriate is when you remove a post or page entirely. For example, let’s say you discontinued a product line. In that case, a 301 redirection to a related product category or your site homepage will produce a better user experience than letting visitors bounce to a 404 page.

Lastly, if you overhaul your site’s permalink structure you will want to add 301 redirects from every affected post and page to tie them to the updated post and page URLs.

302 or: “That Page is Unavailable, Here’s a Temporary Replacement”

A 302 redirect tells browsers and search engines that the requested URL has been temporarily redirected. Search engines will not remove a 302’d URL from their index or pass link juice from the 302’d link to the new URL. This happens because the 302 code tells the search engine that the redirection is just temporary and will be removed in the future.

So, when would you use a 302 redirection? Use a 302 redirect when you plan on removing the redirection in the future.

Let’s dream up a fictional scenario where a 302 would be appropriate.

Imagine with me that you’re managing a conference website that is catching flak because it contains seemingly inaccurate information. Specifically, imagine that your Speakers page is under fire for listing unconfirmed speakers. In that event, a 302 redirection to a related page, such as the Call for Speakers page, would be the right way to hide the Speakers page while the situation is squared away. Once the dust has cleared, just remove the 302 and the Speakers page will again be accessible.

Anytime you want to redirect users away from a specific page or post on a temporary basis, use a 302.

24/7 SUPPORT Expert Superhero WordPress Support Our support crew is waiting for you to start the conversation. We're spaced out over the globe so we can provide 24/7 support for all your WordPress needs. It’s like having a personal WordPress team! TRY 24/7 SUPPORT FREE LEARN MORE

That’s So Meta, and I Hate It

Remember those annoying browser-hijacking redirects I mentioned? Those are meta refresh redirects.

Meta refresh redirects don’t happen on the server. Instead, a meta refresh is created with a meta element in the document head that redirects the user’s browser to a different web page after a preset time interval.

There are very few scenarios where a meta refresh redirect is appropriate. For the most part, avoid them. However, there is one exception.

Some websites consist of regularly updated feeds. Social media sites, news websites, chat sites, and the like are are examples of a webpage that consists of a continuously updated feed. In most cases, the updates are delivered asynchronously using AJAX without requiring the page to refresh. However, if you need a simpler solution than a custom-built JavaScript application, a meta refresh set to update the page (or maybe an embedded iframe) on a periodic basis will ensure that visitors are delivered the most up to date content.

That is one scenario where a meta refresh is an appropriate choice, but it really isn’t a redirect since it just refreshes the existing page. There are very few if any scenarios where meta refresh redirection produces a good UX.

Redirection: There’s a Plugin for That!

Can you believe it? Of course, you can. There’s a plugin for just about everything you want to do in WordPress.

You can create 301 and 302 redirection rules manually. If your site is hosted on an Apache server you can do so by editing the .htaccess file you find in the directory where WordPress is installed. If your site is hosted with a managed WordPress host, or on an NGINX or IIS server, things aren’t quite as straightforward, and you’ll probably be best served to have a talk with your host if you want to create redirection rules manually.

Better yet, just reach for the easy button and create redirects with one of these free plugins.

  • Redirection

    Who should use Redirection: Sites that need to create 301 redirections and want to keep a log of 301 redirections and 404 page hits.

    More than a half-million active installs and a rating of 4.2 out of 5 stars based on over 200 user reviews can’t be wrong. Redirection is easily the most-used redirection plugin in the WordPress Plugin Directory.

    Upon activation, this plugin adds a settings page which is accessed by navigating to Tools > Redirection in the admin dashboard. To create a redirect, first click on the Groups tab and create a new group. When creating the group you can choose WordPress, Apache, or NGINX redirects. If you aren’t sure which to use, stick with WordPress.

    Once you’ve created a group, navigate back to the Redirects tab and use the Add new redirection form to add redirection rules. Keep in mind, Redirection can only be used to create 301 redirection.

    Redirection includes several additional useful features, such as the ability to download your redirects in a variety of formats from the Modules tab, a log of redirection actions, a log of 404 page hits, and the ability to add redirection rules by importing rules in .htaccess or CSV format.

  • Simple 301 Redirects

    Who is Simple 301 Redirects right for: Users looking for a less-is-more plugin to create 301 redirection.

    More than 200,000 WordPress websites use Simple 301 Redirects, and more than 90 users have reviewed the plugin and given it a rating of 4.3 out of 5 stars. Those are strong numbers and reflect the fact that this plugin does exactly what it says: make it simple to create 301 redirects.

    This minimal plugin adds a single screen to the WordPress admin dashboard which is accessed by going to Settings > 301 Redirects. The resulting page displays a form, which is used to create manual redirection rules one at a time. If you want to bulk-upload CSV format redirections, there’s a plugin add-on for that.

    Interested in Simple 301 Redirects?

  • Eggplant 301 Redirects

    Who will be interested in Eggplant 301 Redirects: Websites that need both 301 and 302 redirects and want to avoid creating mistyped redirects that lead to a 404 page.

    Eggplant 301 Redirects is the under-the-radar redirection plugin that more WordPress users should know out. It has an excellent rating, with a score of 4.3 out of 5 stars based on between 25 and 30 reviews, and is active on more than 40,000 sites. That seems like a lot, but is really just a fraction of the installation base of competitors Redirection, Simple 301 Redirects, and Quick Page/Post Redirect Plugin.

    Install the plugin and a new menu item will be added to the admin dashboard at Settings > EPS Redirects. The plugin page has a clean interface with three tabs:

    • Redirects offers up a form for manually entering redirection rules.
    • The 404s tab is inactive with the free version of the plugin but logs 404 hits if you upgrade to the premium version.
    • Access the Import/Export tab to import a CSV formatted list of redirection rules or export a backup copy of your redirection rules. This tab also has a link to download an example CSV file which you can use to model your own list of CSV format redirects after.

    The real reason Eggplant 301 Redirects is on this list is because it has two unique features worth mentioning. First, you can use it to create either 301 or 302 redirects — a feature missing from Redirection and Simple 301 Redirects. In addition, the redirect rule form includes a helper menu which ensures you don’t mess up the destination URL and accidentally bounce visitors to a 404 page when creating redirection rules.

    eps plugin drop down menu

    Interested in Eggplant 301 Redirects?

  • Quick Page/Post Redirect Plugin

    Who is Quick Page/Post Redirect Plugin right for: WordPress users that want the ability to add custom 301 and 302 redirects to posts and pages right from the editor.

    The name might make you think that this plugin provides a streamlined experience similar to Simple 301 Redirects. However, if you thought that, you’d be wrong. Active on over 200,000 WordPress websites, and with a rock-solid rating of 4.6 out of 5 stars, Quick Page/Post Redirect Plugin is a contender for the redirection plugin best bet award (if there is such a thing).

    Upon activation, Quick Redirects adds a new top-level item the admin dashboard menu. The positioning of the menu item indicates something about this plugin: it isn’t simple or basic. It is the most feature-rich redirection plugin out of the bunch.

    Adding redirects from the Quick Redirects from within the admin menu is easy but it does take a little trial-and-error to get the formatting exactly right. The most powerful way to use the plugin is from the post or page editor. To add a custom redirection rule to a specific post or page, open that page or post in the editor and scroll down until you see the Quick Page/Post Redirect meta box. From the editor you can add a highly-customized redirection rule and set it up as either a 301, 302, 307, or meta refresh redirections.

    quick-menu

    In practice, you’ll want to stick to the 301 and 302 options in almost all cases, but it’s nice to have the other options for rare instances where they’re appropriate.

    The other pages available in the Quick Redirects admin menu offer a huge range of additional options. You can redirect an entire website to another URL, turn off all redirects, configure a custom meta redirection notice, open redirects in a new window, and more.

    Interested in Quick Page/Post Redirect Plugin?

  • Auto Refresh Single Page

    Who will be interested in Auto Refresh Single Page: Websites that need refresh a page automatically after a preset time interval.

    This isn’t really a redirection plugin. However, as was mentioned earlier in the article, the most appropriate use of a meta refresh is to continuously update a live feed. If you’ve built a page that pulls in new data all of the time and want it to refresh automatically — say, every 30 seconds or so — this plugin will do the trick.

    Activating the plugin adds a new meta box to the page editor. To automatically refresh that page add any number to the new meta box and the page will automatically refresh after that number of seconds.

    Interested in Auto Refresh Single Page?

Now Go, and Meta Refresh No Longer

Well, at least meta refresh very rarely and responsibly. In most cases, stick to the 301 and 302 redirections the web has grown accustomed to.

Redirection is an important SEO and UX management tool. Understanding the different types of redirects and how to implement each is critical if you are going to manage your site effectively, ensure search engines keep your site’s content indexed, and provide the best experience possible for your site’s users.

Jon Penland
Do you have any redirection horror or success stories? Is there a redirection plugin or technique you prefer that we didn't cover here?

13 Responses

  • New Recruit

    Hi,
    Thanks for sharing this great article.
    Still in the realm of redirects, I would like to ask your opinion on what’s the best approach for domain redirects. For example, my client owned a domain that looked kinda spam my so I suggested he changed that. Now we are getting ready to launch his new site on a different domain but the old domain is 5 years old and many clients of his still use it to have access to info. What would you suggest we do?

    • Author

      Hi Thiago,

      If the new site is a page-for-page replacement, you should 301 each page of the old site to the corresponding page on the new site.

      If the new site isn’t a page-for-page replacement then things are more complicated. Any page that does have a direct replacement on the new site should be 301’d to the replacement page. How you handle pages that don’t have a direct replacement is up to you. I would probably create an unindexed (<meta name="robots" content="noindex">) page on the new site briefly explaining the domain change and providing menus / search prompts the visitor could use to try and find the content they are looking for.

  • The Exporter

    Hi Jon

    As many of those Plugins actually don’t get updated regularly it would be very very helpful to know which one of those still get maintained and which will work in current stable or even better in upcoming 4.6 Version. You can see on the screenshots already that some are completely outdated – probably even insecure! – who knows as the developers don’t keep them updated with at least the current stable versions!

    Thanks

    Andi

    • Author

      Hi Andi – I do try to make sure that the plugins I list are not abandoned. I think it’s important to realize that many very popular plugins listed at WP.org do not show compatibility with the latest version of WP and haven’t been updated in many months. Take a look at Hello Dolly, WordPress Importer, and Google Analytics. All over 1/2 million installs yet they don’t show compatibility with the latest version of WP and haven’t been updated in 12 months or longer. That doesn’t mean those plugins are abandoned or insecure.

      When I list plugins I look at three things:

      When was it last updated? I like to see an update within the past 6 months but that isn’t a hard-and-fast rule.
      Is the author responding to at least some support requests? Keeping in mind that the vast majority of plugins make absolutely no money and the authors are supporting them for free.
      Are there recent positive reviews? If the plugin is incompatible with the latest version of WP you can be sure users will be quick to start leaving negative reviews.

      If those three things check out it indicates to me that the plugin is not abandoned and that there are not glaringly blad compatibility issues with recent versions of WP.

      I should also mention that I do install and try out every single plugin I list on a completely up-to-date WP installation. There were a few additional candidates for this post that I had planned on mentioning that didn’t pass that final test and were cut from the final draft. :)

  • New Recruit

    We use the first plugin, but one important note is to disable it when using WP-CLI! we recently built a multi-site powered store to overcome serious shortcomings in WPML plugin suite and to migrate from staging URL to main we use WP-CLI to ensure the old staging URL is gone. Redirection has a separate use-case, but if you are not careful it interferes with the WP-CLI.

  • New Recruit

    Great article, Jon. I totally agree with you about avoiding pages 404 as much as possible, though I strongly feel that sometimes you need to tell the user “hey that is not longer here”. On those cases, a 404 page with suggested content is the best alternative and if you manage to match that content with the url the user was trying to get AWESOME. Finally, we subscribe 100% to the “funny” 404 pages that gives the user a nice experience when finding an error.

    http://www.ameba.com.uy/whatever-here – Catastrofic and clear 404
    http://www.landesa.org/india-404 – Search Results are about India because the url has “india” on it.

  • New Recruit

    Hello,

    I liked the article, very good. I have a question about redirections that still can not get a satisfactory answer. I have a real estate website and checked on google search the site tracks the properties individually which causes problems of duplicate content. The ideal format for this type of site is the creation of real estate lists based on business type, category and location. Unfortunately my script does not create lists, so I thought I’d create a page with a title, url and meta description in the format:

    Apartments for sale in New York

    Buy apartments in New York

    I waited google crawls the page, and created a link from the site’s search engine with the items New York, apartment and sale. It worked perfectly so I created a list. I used the Redirection plugin, tested redirection in 301 and 307 but in both cases ace pages are gone and are not indexed in google. Bing worked. My question is whether there is a way to make the google crawl the page and keep it indexed?

    • Author

      Hi Carlos,

      It sounds to me like you allowed Google to index a page, and then redirected that page to a different page, yet want Google to continue indexing the original page. Is that correct? If that’s the case, and you’re using a 301 (permanent redirect) Google will drop the original page. However, they might keep it indexed if you use a 302. However, I wonder how well such a page would ever rank considering that no one can actually visit the original indexed page and it won’t attract any links as a result.

      Jon

Comments are closed.