What Is a Canonical Redirect and Why It Matters for SEO

What a canonical redirect is, when to use one instead of a canonical tag, how it affects SEO, and step-by-step implementation for common web servers.

A canonical redirect is a server-side redirect that resolves duplicate URLs by sending all traffic to a single, preferred version. The classic example: redirecting http://www.example.com to https://example.com (or vice versa) so that search engines only ever see one URL for the same page.

It sounds simple, but getting this wrong is one of the most common technical SEO problems. Duplicate URLs split your link equity, confuse crawlers, and waste crawl budget. A canonical redirect fixes all three issues at the server level.

For a broader look at how redirects work across HTTP, see our HTTP Redirect Guide.

How canonical redirects work

When a user or search engine bot requests a non-preferred version of your URL, the server responds with a 301 Moved Permanently status code and a Location header pointing to the canonical URL.

Request:  GET http://www.example.com/about
Response: HTTP/1.1 301 Moved Permanently
          Location: https://example.com/about

Request:  GET https://example.com/about
Response: HTTP/1.1 200 OK
          (serves the page)

The browser follows the redirect automatically. Search engines register the 301 and transfer ranking signals to the canonical URL. Over time, the non-preferred versions drop out of the index entirely.

This is different from a rel="canonical" tag, which is an HTML hint rather than a server-level instruction. More on that distinction below.

Common scenarios that need canonical redirects

www vs non-www

Your site is accessible at both www.example.com and example.com. Without a redirect, search engines treat these as two separate sites with two separate link profiles. Pick one and redirect the other.

HTTP vs HTTPS

After installing an SSL certificate, your site responds on both http:// and https://. The insecure version needs to redirect to the secure one. See our HTTP to HTTPS redirect guide for implementation details.

Trailing slash inconsistency

/about and /about/ are technically different URLs. If your server responds to both, you need a canonical redirect to one or the other.

Mixed case URLs

Some servers treat /About-Us and /about-us as the same page and serve identical content at both URLs. A redirect from the non-preferred casing to the canonical version prevents duplicate content.

URL parameter variations

URLs like /products?sort=price and /products?sort=price&page=1 can generate dozens of duplicate pages. While parameter handling is often better solved with canonical tags (since the content is similar but not identical), fully duplicate parameter URLs benefit from redirects.

Redirect vs canonical tag

This is where many site owners get confused. Both canonical redirects and rel="canonical" tags solve the same core problem (duplicate content), but they work very differently.

Factor301 Redirectrel=canonical Tag
MechanismServer response, forces browser to new URLHTML hint in page head, advisory only
User experienceUser sees canonical URL in address barUser stays on duplicate URL
Search engine complianceMandatory. Engines must follow it.Advisory. Engines can ignore it.
Link equity transferPasses ~100% of link equityPasses equity but less reliably
Page must be accessibleNo. Redirect fires before page loads.Yes. Search engine must crawl the page to see the tag.
Crawl budgetSaves budget (one request + redirect)Wastes budget (engine crawls both pages)

Use a 301 redirect when:

  • The duplicate URL should never be visited directly (www/non-www, HTTP/HTTPS)
  • The content is 100% identical and the duplicate URL serves no purpose
  • You have control over server configuration

Use a rel="canonical" tag when:

  • The content is similar but not identical (e.g., print versions, parameterized URLs)
  • You cannot control server-side redirects (some hosted platforms)
  • You want both URLs to remain accessible to users

Google's documentation states that a redirect is a stronger canonicalization signal than a rel="canonical" tag. [1] When both are possible, the redirect is the more reliable choice.

For sites using sitemaps, your sitemap should only include the canonical version of each URL. Submitting duplicate URLs in your sitemap sends conflicting signals. See sitemap best practices for more on keeping your sitemap clean.

How canonical redirects affect SEO

Link equity consolidation

When ten different URL variations all point to one canonical URL via 301 redirects, all of the link equity from backlinks to those variations flows to the canonical URL. Without the redirect, that equity is fragmented across all ten versions.

Google confirmed in 2016 that 301 redirects pass full PageRank with no dampening factor. [2] This means there is no SEO cost to consolidating through redirects.

Crawl budget efficiency

Every URL on your site uses crawl budget when Googlebot visits it. If you have four variations of every URL (http/https, www/non-www), you are burning four times the crawl budget for the same content. Canonical redirects cut that down to one crawl per page, plus the occasional redirect check.

For small sites this does not matter much. For sites with tens of thousands of pages, the crawl budget savings are significant.

Index consolidation

Without canonical redirects, Google may index multiple versions of the same page. This dilutes your search presence. Instead of one strong listing for a page, you might have two or three weaker listings competing with each other.

Once canonical redirects are in place, Google consolidates these index entries over a period of weeks. You should see the non-preferred versions drop out of search results and the canonical version strengthen.

Check your current state first

Before setting up canonical redirects, trace your existing redirects to understand what is already in place. Layering new redirects on top of existing ones can create redirect chains that cause more problems than they solve.

Implementing canonical redirects

Apache (.htaccess)

Redirect HTTP to HTTPS and www to non-www in a single rule set:

RewriteEngine On

# HTTP to HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

# www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Nginx

# Redirect www to non-www + enforce HTTPS
server {
    listen 80;
    listen 443 ssl;
    server_name www.example.com;
    return 301 https://example.com$request_uri;
}

server {
    listen 80;
    server_name example.com;
    return 301 https://example.com$request_uri;
}

Cloudflare

If you use Cloudflare, you can handle canonical redirects with Page Rules or Redirect Rules without touching your origin server. See our Cloudflare redirect guide for a step-by-step walkthrough.

Trailing slash normalization (Nginx example)

# Remove trailing slash (except for root)
rewrite ^/(.*)/$ /$1 permanent;

Or to add a trailing slash:

# Add trailing slash
rewrite ^([^.]*[^/])$ $1/ permanent;

Pick one convention and stick with it across your entire site.

Verifying canonical redirects

After implementing your redirects, verify them:

curl -I http://www.example.com/about
# Should return 301 with Location: https://example.com/about

curl -I http://example.com/about
# Should return 301 with Location: https://example.com/about

curl -I https://www.example.com/about
# Should return 301 with Location: https://example.com/about

curl -I https://example.com/about
# Should return 200 OK

All four URL variations should resolve to the same final destination with no more than two hops. If you see redirect chains forming (HTTP to HTTPS, then www to non-www in separate hops), reorder your rules so the server resolves both in a single redirect.

For more on testing approaches, see How to Check URL Redirects.

Common mistakes

Redirecting in the wrong direction

Decide which version is canonical (www or non-www) and be consistent. If your backlink profile is mostly pointing to www.example.com, redirect non-www to www. Going the other direction means your existing backlinks all go through an unnecessary redirect.

Forgetting HTTPS in the redirect target

A redirect from http://www.example.com to http://example.com removes the www but leaves the HTTP problem. The user then hits a second redirect from HTTP to HTTPS. Always redirect to the full canonical URL: https://example.com.

Not updating internal links

Canonical redirects are a safety net, not a replacement for correct internal links. After setting up redirects, update your internal links, sitemaps, and canonical tags to point to the preferred URL directly. This reduces unnecessary redirect hops and saves crawl budget.

Conflicting canonical tags

If your page has a rel="canonical" tag pointing to a different URL than your redirect, you are sending mixed signals. Make sure your canonical tags, redirects, and sitemap all agree on the preferred URL.

Canonical redirects and site migrations

During a site migration, canonical redirects become even more critical. You are not just resolving www/non-www or HTTP/HTTPS variations. You are redirecting every old URL to its new equivalent on a new domain or URL structure.

The same principles apply: use 301 redirects, point directly to the final canonical URL, and verify that no redirect chains form. The stakes are higher because a migration typically involves hundreds or thousands of redirects, and a single misconfigured rule can cascade across the entire site.

The takeaway

A canonical redirect is the strongest signal you can send to search engines about which version of a URL is the "real" one. It consolidates link equity, saves crawl budget, and prevents duplicate content issues. Unlike a canonical tag, it is not a hint that search engines can ignore. It is a hard instruction that forces both browsers and crawlers to the right URL.

If your site is accessible at multiple URL variations and you have not set up canonical redirects, you are leaving SEO value on the table. It is one of the highest-impact, lowest-effort fixes in technical SEO.

References

  1. Google, "Consolidate duplicate URLs," Google Search Central, 2024. https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
  2. Gary Illyes, Google, "30x redirects don't lose PageRank anymore," Twitter/X, July 2016.
  3. IETF, "RFC 9110 - HTTP Semantics, Section 15.4: Redirection 3xx," June 2022. https://httpwg.org/specs/rfc9110.html#status.3xx

Never miss a broken redirect

Trace redirect chains and detect issues before they affect your users and SEO. Free instant tracing.

Try Redirect Tracer