Clicking on a broken link on a website is like your GPS leading you down a dead-end: frustrating and a waste of time. Since broken links can hurt your site rankings as well as the visitor experience, it's critical to avoid them.
While you should regularly check your website for broken links, it's particularly important when migrating your site to a new platform like WordPress.
Redirect plugins will ensure that any broken links point to another relevant page on your site. That way, if a visitor clicks on a broken link, they'll simply be redirected to a new location where they can continue browsing. This will not only help maintain your site's credibility — it will also prevent your site's rankings from falling.
Let's take a look at how to redirect a URL in WordPress, then explore some plugins that can automate the process.
How to Redirect a URL in WordPress
A 301 redirect is a status code that tells a browser that the page it was trying to access has been permanently moved to another URL. Think of a 301 redirect as a mail forwarder service. If mail ever arrives at your old address, it will automatically be sent to your new home.
If you have access to your server files and your server runs on Apache software, you’ll need to add code to your hypertext access (.htaccess) file to manually set up redirects. Considering that one mistake in this file can break your whole site, it’s important to make a back-up of this file first.
To do so, go to File Manager and select the .htaccess file. Right-click to rename it .htaccess_old. This is now your backup file.
Now, go to public_html in File Manager, and create a new text file. Name it .htaccess. This will be your new file.
Time to add your code now. Let’s say you want to redirect an outdated post to a more recent one. Then you’d copy and paste the following code at the end of the file.
Do you want to keep track of your 404 errors and manage the 301 redirects on your site? If you answered yes and yes, Redirection is the plugin for you.
With Redirection, you don't need any knowledge of Apache or Nginx to complete these tasks. You can configure the plugin to automatically create a redirect when the permalink of a post or page is changed or when other conditions are met.
You can also use Redirection's configurable logging feature to view all redirects occurring on your site and to keep track of information about the visitor, the browser they used, and the referrer.
The best news: this plugin is available in multiple languages and it's free. For all these reasons, Redirection is ideal if you plan to migrate your content from one site to another, or are changing the directory of your WordPress installation.
Like Redirection, 301 Redirects is a free and highly-rated plugin. As the name implies, this plugin allows you to create 301 redirects, as well as 302 and 307 redirects. You can redirect old URLs to other similar posts based on title, post types, and categories or tags, or create a new custom URL.
It offers a 404 error log that can help you keep track of error pages. That way, you don’t have to run a manual audit every time, or visit every page to make sure it’s still live.
Safe Redirect Manager is another free and top-rated redirect plugin in the WordPress directory. With this plugin, you can easily redirect any pages and posts to new URLs with HTTP status codes like 302 and 301.
Designed to handle heavy traffic and available in English and other languages, Safe Redirect Manager is a lightweight plugin used on major publishing websites.
WordPress Ultimate Redirect Plugin is a premium tool available in the CodeCanyon marketplace.
With this plugin, you can set up redirects in a few different ways. You can use its auto-redirect feature to send visitors to the nearest URL match automatically. Or you can set up flexible redirect rules to send your visitors to a relevant page based on the visitors’ device or referral source.
Yoast SEO is one of the most widely used WordPress plugins for SEO. While it offers a free version that comes with lots of excellent features, the premium version comes with a redirect manager.
The redirect manager allows you to easily redirect your pages to another location on your WordPress site. You can use 301 (Permanently Moved), 302 (Found), 307 (Temporary Redirect), 410 (Gone Error), and 451 (Unavailable For Legal Reasons) status codes.
You can even automate this process for existing content on your site. If you change the URL of an existing post or page, Yoast SEO Premium will automatically create a redirect from the old to the new URL. If you delete a post or page, on the other hand, the plugin will immediately notify you to create a redirect.
You can set up a variety of redirects for your site using the SEO Redirection plugin. With this free plugin, you can also monitor 404 error pages and redirect them to another location with ease. You can even redirect entire folders and everything they contain, like your index.html file.
Like other plugins mentioned above, SEO Redirection will automatically add a 301 redirect when the URL of a post changes. It will also keep track of all the redirects on your site in one place.
What sets the Simple Website Redirect plugin apart from the others on the list is its scale. While the other plugins allow you to redirect tens to hundreds of URLs on your site, Simple Website Redirect allows you to redirect an entire website to another domain.
For one-off redirects where you want to point a URL for an old page to a new page, you can use another plugin mentioned on this list. The plugin author recommends the Redirection plugin, specifically.
Broken Link Checker was created by WPMU DEV to help site owners monitor not only their posts and pages, but also their comments, custom fields, and blogroll. Once installed, this free plugin will automatically scan your WordPress site for broken links.
It will then notify you either by email or a dashboard notification when it's done scanning. In a new tab of your dashboard labeled Broken Links, you can edit the links directly without having to manually update each post and page. If you'd rather not add a new URL to redirect the link, you can simply remove it and the text will stay the same.
Available for free in WordPress’ official directory, the 404 Solution plugin automatically redirects 404 URLs to existing pages on your site and logs the errors.
If you’d prefer to set up redirects manually or simply review the auto-redirects, then you can view the logged errors in your WordPress dashboard. The 404 Solution plugin will even provide a list of page suggestions to help you find the best possible match for the URL that the visitor was likely trying to reach.
Like the 301 Redirects tool mentioned earlier, 404 to 301 keeps an error log of 404 codes on your website and automatically redirects 404s to an existing page. The moment you delete a post or page, this plugin will pick up on that change and automatically create a 301 redirect to your home page or another page that you’ve chosen.
Say goodbye to broken links.
Redirect plugins are an important asset for every website, no matter its age or industry. All of the plugins above can help simplify the process of setting up redirects on your site so you (and your visitors!) don't have to worry about any dead ends. Many of them are compatible with other plugins, so you can keep extending the functionality of your site with tools like the HubSpot WordPress plugin.
Editor's note: This post was originally published in June 2020 and has been updated for comprehensiveness.
Originally published Mar 26, 2021 7:00:00 AM, updated March 26 2021