A canonical redirect points all alternate URLs of a page to one preferred address. This is useful when the same content is reachable through multiple URLs, which can confuse search engines and split ranking signals.
WordPress adds canonical tags automatically, but it does not always redirect visitors and crawlers to a single preferred URL. URLs with custom parameters, manually edited slugs, or plugin-generated paths may bypass this redirect logic.
As a result, alternate URLs can still be crawled and indexed. Therefore, for websites with advanced URL structures, relying only on built-in canonical redirect may not be sufficient.
What Is Canonicalization?
What Are Canonical URLs?
It is common for a single WordPress page to exist under several different URLs. This usually happens when tracking parameters, referral tags, or alternate URL formats are added to the original address.
Sometimes the same page can appear under different URLs, such as:
https://example.com/sample-page/
https://example.com/sample-page?ref=instagram
https://www.example.com/sample-page/1/
All of these URLs show the same content. Visitors will not notice any difference no matter which URL they use, but search engines need a canonical URL to know which version to treat as the main page.
Without a canonical URL, search engines may treat each URL as a separate page. This can lead to duplicate content in the index and diluted ranking signals across multiple URLs.
You can address this by using an extra SEO plugin or by extending the custom canonical tags without a plugin through custom code snippet.
Where to Find a Canonical URL?
The easiest way to find a page's canonical URL is by checking its HTML source code. This is helpful, but the meta tag itself does not promise that Google will always respect it.
When a page exists at several URLs, Google might pick a different version to show in search results. Therefore, using a canonical redirect is an additional precaution to make sure the preferred URL is used.

What Is A Canonical Redirect?
A canonical redirect ensures that a specific page is always accessed through just one main URL. If a page can be reached by several different addresses, visitors are automatically sent from any alternate version to the preferred, canonical one.
Canonical redirects play an important role for several reasons. They make sure that the SEO value from backlinks does not get lost when URLs change but instead moves to the updated links.
Besides that, they help signal which page should be treated as the main one. This reduces the chance of duplicate content appearing, which means the search engines do not waste their crawling budget.
There are two key types of redirects, each sending a different message through HTTP status codes:
- The more common one is the 301 redirect, which signals that the original content has been moved permanently to another address.
- The other type is the 302 redirect. This one is less frequent and is meant for temporary moves. It works well if you only want to move content for a brief period and plan to bring it back.
How Canonical Redirect Works In WordPress?
WordPress can serve the same page under different addresses. Search engines may treat these URLs as separate pages, which can split search ranking signals. To prevent this, WordPress selects one canonical URL and redirects visitors and crawlers to it.
This behavior comes from WordPress rewrite rules, which use regular expressions to interpret URLs. If the slug matches a post/term in the database, WordPress will load it, even if the rest of the link is messy or formatted incorrectly.
This means the same content may be served from query-based URLs, or URLs that differ only by a trailing slash. By design, those non-canonical URL variants should be handled by the "redirect_canonical()" function.
This function is hooked to the "template_redirect" action and runs late in the page load, once WordPress identifies the content a URL points to. The target (canonical) URL is passed through a filter, allowing plugins or themes to modify or cancel it.
Guess 404 Permalink Redirect
What is more, the canonical redirect functionality contains one additional, lesser-known component: the "redirect_guess_404_permalink()" function. When you enter a URL that does not exist based on the precise WordPress query (due to a typo or a broken link), it will redirect the user to a similar link. In other words, it tries to "correct" the requested URL and send a visitor to the actual URL address.
In certain situations, this can occasionally lead to URLs loading the wrong pages. If you see this happening on your website,,you can switch it off using the code snippet provided at the end of this article.
URL with the typo:
https://example.com/product/shir/cotton/pique-polo
Canonical URL (redirect target):
https://example.com/product/shirts/cotton/pique-polo
Old Slug Redirect
WordPress also includes a lesser-known "Old slug redirect" functionality that works in a slightly different way than canonical redirect. In short, this feature helps prevent "404 not found" errors by handling outdated URLs after a native slug has been changed.
What happens behind the scenes is that WordPress saves the previous slug as a custom field named "_wp_old_slug". So, when a visitor requests a URL, WordPress sees if the slug has ever been used before. If it does, it quietly sends the visitor over to the updated URL.
For example, imagine you created a page titled "Cape Verde", which generated the slug "cape-verde".
Old URL:
https://example.com/africa/cape-verde/
If you later update the title to "Cabo Verde" and change the slug to "cabo-verde", the old slug remains in the database. Anyone visiting the original URL will be redirected to the new address:
Redirect target URL:
https://example.com/africa/cabo-verde/
At first, this feature appears very useful. However, it operates behind the scenes and offers very limited control. The main challenge is that you cannot get a list of all saved slugs that trigger redirects, so analyzing them is difficult.
Troubleshooting
Canonical redirects help avoid duplicate content by sending users to the preferred URL, but they only work if configured properly. Conflicts such as redirect loop often arise when plugins interfere or when server-level rules override them.
To identify the source, examine HTTP response headers. When a redirect is called using wp_redirect() function, it includes a header called "X-Redirect-By".
If this header contains the value “WordPress”, it means the redirect was triggered by WordPress itself. If a plugin name appears instead, then that plugin is the one handling the redirect.
It is also useful to deactivate your plugins and theme one at a time to test where the issue might be coming from. If none of these steps work, there are additional tips and solutions covered later in this guide.
How To Disable Canonical Redirect?
The default canonical redirect functions work reliably in most cases. Yet, it can sometimes interfere with custom code or plugins. To address this, you can use the PHP code snippet below to disable canonical redirect completely or only their single components.
# Disable canonical redirect completely
remove_action( 'template_redirect', 'redirect_canonical' );
# Disable "old slug" redirection
remove_action( 'template_redirect', 'wp_old_slug_redirect' );
# Disable "guess 404 permalink" redirection
add_filter( 'do_redirect_guess_404_permalink', '__return_false' );
If you do not have experience with PHP or already use the Permalink Manager plugin, you can disable this feature in the plugin’s settings. This option is also available in the free version (Permalink Manager Lite).

Canonical Redirect In Permalink Manager
URL changes often lead to frustrating 404 "not found" errors. To prevent this, the Permalink Manager plugin includes a robust fallback mechanism for old permalinks. It automatically redirects any non-canonical URL variations to the canonical URL defined within the plugin.
Permalink Manager offers two main methods to prevent 404 errors when outdated URLs are accessed.
Redirecting Original WordPress URLs
The first feature automatically redirects original WordPress URLs to their updated custom permalinks. However, WordPress still needs to recognize those original links.
You do not need to change anything in the default settings. Just leave the built-in permalink settings untouched in "Settings -> Permalinks", and the plugin will handle the rest using the custom permalinks and Permastructures.
Old (native) URL:
https://example.com/shop/old-original-product-permalink/
New URL (custom permalink, redirect target):
https://example.com/new-url-set-with-permalink-manager/

Old Custom Permalink Redirects
The second method "old custom permalink redirect", needs to be enabled manually in the plugin settings. It records every previously used custom permalink so that if a permalink changes, the previous version is automatically redirected to the new one.

