
Although WordPress is resilient against poorly entered URLs and dead links, you shouldn’t be careless. Poor redirection might not always break your website, but can significantly impact your website SEO. Additionally, it can cause your page speed to take a nosedive, sending even the most loyal visitors away. Finally, even if the URL or WordPress slug is entered properly, the type of redirect might not be, leading to the same disheartening results. But don’t worry – we’ll go over all of those issues as we demonstrate how to minimize redirects in WordPress. Let’s start.
Redirect that needs minimization: An example
We mentioned WordPress core functionality can catch partial or wrong URLs, find the correct ones, and redirect the user to them. To demonstrate this, we’ll assume a website has forced SSL in WordPress. So, let’s say a visitor wants to visit “https://www.example-site.com/parent-page/page” but enters “http://example-site.com/page”. The following will happen:
- The visitor will be redirected from the unsafe (http) to a secure (https) version of the website.
- They will be redirected from the incomplete URL (without www) to the complete URL (with www).
- WordPress will look for the requested page and complete the URL to include the parent page.
- The Internet browser will load the page contents and display them to the visitor.
Why is this problematic?
As you can see, the visitor can absolutely butcher the link and still get to the desired URL. That’s wonderful to a degree, but it comes with downsides. The first is page speed since the user has to be bounced a few times to reach the destination. This adds seconds to the loading time when every millisecond matters. Also, it’s not a coincidence that “bounce rate” has that name. Visitors are likely to click the Back button or simply close the tab even after the page opens, affecting your website SEO negatively. Plus, it increases the chance that the page doesn’t resolve or that one of the links becomes dead. Moreover, Google bots and crawlers will determine your website has poor architecture.
Which redirect type should I use?
Besides learning to minimize redirects in WordPress, you should use the correct HTTP redirect code:
Redirects to use
You should use these 2 redirects:
- 301 – Permanent redirect that tells the search engines the old page no longer exists or is obsolete. It also passes on the majority of the link juice of the old page, between 90% and 99%, and its page authority to the new page.
- 302 – Tells search engines that the page is moving temporarily. It will redirect users to the new URL, but won’t pass on the link juice or page authority.
Redirects not to use or use rarely
The following redirects shouldn’t be used or used sparingly:
- 303 – Temporary redirect that prevents pages that store data from being bookmarked or refreshed, such as payment forms or login pages. Only use it when you want to forbid users from resubmitting forms after clicking the Back button.
- 307 – Temporary redirect or internal redirect. Inferior to a 302 redirect, but it has a 303 response to prevent man-in-the-middle attacks.
- 308 – Permanent redirect that works like a 301 redirect, but its effects aren’t well-established.
1. Stop lazy redirecting in WordPress
Before you do anything to fix your past mistakes, you must cease making new ones. The most important advice is that, when building internal links or menus, there shouldn’t be any redirects. So, to eliminate redirects when linking in WordPress, do this:
- Use the proper protocol prefix, either http or https.
- Either include or exclude the www subdomain, depending on how you configured your WordPress website URL.
- Do not use post or page IDs in links. Unless you’re using an eCommerce plugin, you should use the %postname% permalink architecture.
- Always enter the full page or post URL, including parent pages and category names.
2. Ensure Top-Level Domain (TLD) resolves with none or a single redirect
Here’s a 2-step guide to making sure your top-level domain resolves with no more than one redirect:
1. Analyze which TLD needs redirection adjustment
TLD is your domain name without any subdomains or protocol prefixes. So, when entered into the address bar, there should be no redirects at all. If you enter a variation, your TLD should open in one redirect or less. To test this, use a Redirect Mapper software or online tool of your choice. We’ll use Redirect Detective (https://redirectdetective.com) for demonstration. Enter these variations one by one before clicking the magnifying glass icon:
- http://www.example-site.com
- http://example-site.com
- https://www.example-site.com
- https://example-site.com
2. Adjust TLD redirection
Saw 2 or more redirects in-between the variation and the TLD? We already taught you to find and fix broken links in WordPress so use that knowledge. For example, if “http:/example-site.com” > “https://www.example-site.com” takes 2 redirects, create a direct 301 redirect between the two URLs.
3. Analyze your WordPress website for poor redirects and broken links
To discover poor redirects (2 or more bounces), visit posts or pages manually and check the internal links. This will be tedious, obviously. At the very least, check your home page content, and the pages linked on the home page. As for broken URLs, the guide above lets you do it quickly and easily, both the detection and the solution.
4. Update old content properly
Let’s take a post titled “New PHP Version: Key Changes” for example. It has a good ranking but is about a 7.4.7 release while visitors are looking for 8.0.6 release changes. While you can add an internal link that points to the new page, visitor still has to read a wall of irrelevant text, find it, and click on it. How many people would perform a manual redirect? The answer is very few, and your bounce rates would skyrocket. Instead, you should create and publish a new post, then configure a 301 redirect from the old to the new page. This would minimize redirects in WordPress by bypassing the old page entirely.