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.
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.
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.