Photo by Isaque Pereira via Pexels
We’ve talked plenty about amazing WordPress plugins that provide tons of creative functionality to your site: Advanced Custom Fields and its extensions, image plugins, Theme My Login, Gravity Forms, and so much more.
While most of these plugins improve the way you work, today let’s talk about a plugin that just works: Redirection.
It’s one of the older WordPress plugins in our repertoire, and for good reason. It’s not fancy, it doesn’t change the way your community interacts with your site, and doesn’t affect your design or brand. But it’s the glue that holds together your user experience, and makes a huge impact on your SEO.
At its simplest, Redirection is a plugin for managing your 301 redirects – the URL changes and broken links that redirect your users to a working page on your website.
Rather than get hit with a 404 error page, Redirection will send a user going to a broken link instead to a page of your choice (that actually works!).
While this doesn’t seem like a big deal, redirecting a user to a working page does two crucial things:
It’s inevitable that your site will have URLs that need redirecting, even if you are especially careful about only linking to content that exists.
For example, a third-party site may link to you – but have a typo in their link. In that case, the user clicking the link won’t know there’s a typo – they’ll just get sent to your error page. When that happens, you can set up a redirect from the incorrect URL to the correct page, and the users clicking the wrong link will be none the wiser.
Over time, you may remove outdated content from your site – but links to it may still exist somewhere. That calls for adding a redirect to current content that’s relevant to the person who may have the old link.
The best way to track broken links is using Google Search Console; once your site is connected, Google will notify you of any 404 errors it finds, which you should promptly fix by redirecting to an appropriate URL.
The functionality of Redirection is blue-collar: you have a broken URL, you add a redirect to Redirection, and it’s no longer a problem. Rinse and repeat.
But the plugin also comes with some incredibly helpful functionality beyond doing simple redirects.
While you’re most likely going to use Google Search Console or Screaming Frog for an “official” list of broken links, Redirection itself will track 404 errors on your site.
This gives you an easy-to-access list of URLs that aren’t taking people to actual, working pages, with a simple way to add redirects where appropriate.
Some of the URLs shown here may not need redirects – they’re not actual URLs real people access – so rely on Google Search Console for definitive broken URLs.
RegEx, or “Regular Expression”, is a sequence of characters that act as “wild cards” for specific URL patterns that may be very similar.
For example, if you don’t want any auto-generated “author” URLs created by WordPress to be accessible, you can redirect all of them using a RegEx pattern. Here’s what it would look like:
The redirects don’t automatically accept RegEx arguments, so you need to check the box under the dropdown next to “Source URL” in order to use them.
To learn more about the specific RegEx characters, use this resource.
Ever wonder which of your redirects is getting used the most? Redirection can tell you.
In the “Logs” tab, you’ll see all of the latest redirects being accessed and by whom (well, at least their User Agent).
Why does this help you? In a perfect SEO world, rather than relying on redirects to get people to the right place, you’d fix broken links by updating the links themselves to the correct URL. Now, that’s not always doable – especially if it’s coming from a site you don’t manage – but with this list, you can see which of your redirects are most accessed and attempt to update all of the links to the redirect to the correct URL.
One tip about logging: don’t keep your logs forever – it just adds to WordPress bloat.
Under Options, set a time limit to how long your logs are stored so your database doesn’t become bigger than necessary.
One of the sneaky places where broken links pop up is when existing pages and posts have their URLs changed. Oftentimes, it’s done for good reason – more thoughtful permalinks, perhaps – but you’re not always considering the fact that there’s now another out-of-date URL in the wild.
Redirection will actually monitor when URLs change and automatically create a redirect for you, if you’d like. It can be set for each post type, and even grouped together as needed.
To access this option, click the “Options” subnavigation in the plugin and scroll to the URL section.
When you have a bunch of URLs that need redirecting, sometimes it’s just easier to manage them in bulk. If you have a massive list of broken links, and you want to set redirects in a spreadsheet or Excel file before uploading, Redirection is ready for it.
It’s a very simple format (Redirection doesn’t even provide a template to use – just create your own) with at least 2 columns:
Don’t even use a header row in your spreadsheet; just start with the the data itself.
Redirection also lets you export out all your redirects as needed, so if you need to make mass changes or move them some place else, it’s incredibly easy.
For a blue-collar plugin, there’s just so much that’s useful about Redirection.
After you add a new redirect, I always recommend using the “Check Redirect” link that appears when you hover over your newest entry. This features integrates a site called Redirect.li to check your newly created redirect and ensure it’s going where you want.
Assuming it works correctly, you’ll see a message like this pop up:
If you see an error message, it could be one of a few things:
Because it’s a WordPress plugin, Redirection usually doesn’t have access to every file or folder on your website server – so it can’t redirect anything out of its purview. Usually, that means URLs in non-WordPress folders (ie, a third-party folder called /files/), standalone PHP files (for example, a privacypolicy.php file at the root of your server), and direct URLs to PDF and other file types (like /wp-content/uploads/statement.pdf).
When you have instances where Redirection can’t create the redirect, you’ll need to use a tool that can – usually provided by your website host, as it has total access to the server.
Have questions about Redirection or managing redirects? Reach out and let’s chat.