301 Redirect vs Canonical Tag: Which One to Use (2026)

When to use a 301 redirect, when to use rel=canonical, and when to use neither, from Google's current docs, with setup notes for Cloudflare, Squarespace and WordPress.

Use a 301 redirect when the old URL should stop existing: a page moved, two pages merged, or you’re switching domains. Use a rel="canonical" tag when the duplicate URLs need to keep working for visitors, such as the same product list sorted in different orders, and you only want search engines to pick one. A redirect moves both people and search engines. A canonical tag only makes a suggestion to search engines, and Google treats it as “a hint, not a rule” (Google).

Updated 19 November 2026. We first published this post in February 2012. This version replaces the 2012 advice with what Google’s documentation says today. Google says duplicate URLs on your own site aren’t a spam violation and don’t bring a “duplicate content penalty”. Canonical tags are a hint Google can overrule. And the old advice to use a canonical for syndicated copies has changed. The post also moved from /blog/301-redirect-or-url-canonicalizationhtml/ to this URL, and the old address 301s here. All sources were read on 19 November 2026.

TL;DR

  • 301 (or 308) = permanent move. Visitors and search engines go to the new URL, and Google uses it as a strong signal that the new URL should be canonical.
  • Canonical tag = “index this one, please.” Every URL keeps working. Google treats the tag as a strong signal but can choose a different page.
  • Duplicates don’t get you penalized. Google: “Some duplicate content on a site is normal and it’s not a violation of Google’s spam policies.”
  • Permanent redirects don’t lose PageRank, per Google’s site-move guide. Keep them for at least a year, and longer if people still use the old links.
  • Syndicated copies on other sites: Google now recommends the partner adds noindex, not a canonical tag.
  • Check the default status code. Cloudflare’s _redirects file and WordPress’s wp_redirect() both default to 302 (temporary). Write 301 when you mean it.

What a 301 redirect does

A redirect sends anyone who asks for one URL to another. Google’s redirects guide puts it this way: redirecting tells “your visitors and Google Search that a page has a new location” (Redirects and Google Search).

Visitors can’t see which kind of redirect it is, but Google can, and it treats the two kinds differently:

TypeStatus codesWhat Google does
Permanent301, 308 (also an instant meta refresh)Follows it and uses it as a signal that the new URL should be canonical; Google says it shows the new URL in results
Temporary302, 303, 307 (also a delayed meta refresh)Follows it but keeps showing the old URL, unless other signals point to the new one

Source: Redirects and Google Search. Google’s crawler docs call 301 and 308 a “strong” signal and 302 and 303 a “weak” one (How HTTP status codes affect Google’s crawlers).

Use a permanent redirect when:

  • you move a page to a new URL (as we did with this post),
  • you merge two pages that covered the same thing,
  • you move to a new domain, or from http:// to https://.

A few rules from Google’s site move guide:

  • Link credit carries over. “301 and other permanent redirects don’t cause a loss in PageRank.”
  • Avoid chains. Googlebot follows up to 10 hops, but Google advises redirecting straight to the final URL, or keeping chains “ideally no more than 3 and fewer than 5.”
  • Keep them a long time. “Keep the redirects for as long as possible, generally at least 1 year.” For people who still click old links, Google suggests keeping them indefinitely.
  • Use server-side redirects where you can. A JavaScript redirect only works if Google renders the page, and rendering can fail (Redirects and Google Search).

What a canonical tag does

A canonical tag is a line in the <head> of a page that names the preferred URL for that content:

<link rel="canonical" href="https://www.example.com/mens-shirts/" />

It’s for when several URLs show the same content and they all need to keep working. The classic case is a shop where sorting creates new URLs:

  • example.com/mens-shirts/?sort=price
  • example.com/mens-shirts/?sort=rating
  • example.com/mens-shirts/?sort=newest

Shoppers need all three. Search engines only need one, so each version carries a canonical tag pointing at example.com/mens-shirts/.

What Google’s current docs say about canonicals (Specify a canonical):

  • It’s a hint. “Google may choose a different page as canonical than you do”, for example because of content quality or other technical signals (Canonicalization; troubleshooting).
  • Permanent redirects and canonical tags are both strong signals. Being listed in a sitemap is a weak one.
  • Put a self-referencing canonical on the main page too. Google: “Do include a rel="canonical" link on the canonical page itself.”
  • It must be in the <head>. A canonical link anywhere else is ignored.
  • Don’t send mixed signals. Don’t name one URL in your sitemap and a different one in the canonical tag.
  • Don’t use noindex instead. Within one site, Google doesn’t recommend noindex to steer the canonical, “because it will completely block the page from Search.”
  • PDFs and other files can declare a canonical in an HTTP Link header.
  • Pagination isn’t duplication. Google’s 2013 guidance says page 2 of a list shouldn’t name page 1 as canonical, “as these are not duplicate pages” (Google, 2013).

You also don’t strictly need either. Google says that none of these methods is required, and that “your site will likely do just fine without specifying a canonical preference.”

Is there a duplicate content penalty?

No, not for ordinary duplicates. The 2012 version of this post warned that search engines might “completely remove your site from their index” for duplicate pages. Google’s current wording is: “Some duplicate content on a site is normal and it’s not a violation of Google’s spam policies” (Canonicalization). Google’s own 2008 post on the subject opens with “There’s no such thing as a ‘duplicate content penalty’” (Google, 2008).

Duplicates still have costs. Google may show a URL you didn’t want, and links can be spread across several versions of one page. That’s what redirects and canonicals fix.

301 or canonical: which to use

SituationUseWhy
Page moved or renamed301The old URL has no reason to exist
Two pages merged into one301 from the one you dropVisitors and links land on the page that’s left
New domain, or HTTP to HTTPS301 for every URL that has a new equivalentGoogle’s site move guide recommends server-side permanent redirects, and 404 or 410 for content you don’t move
Sort-order or tracking-parameter URLs, and filter combinations that show essentially the same productsCanonicalVisitors still need those URLs to work. A filtered page with a distinct product set may deserve to be indexed on its own (Google on faceted navigation)
Same article in two places on your own siteCanonicalGoogle’s News help allows it within your own site
Your article republished on another site, and you want only your copy in Searchnoindex on their copyGoogle no longer recommends canonical for syndication partners
Temporary move to a useful page (a seasonal page standing in for the regular one)302 or 307Google keeps showing the original URL
Site has to go fully offline for a day or two503 error page, not a redirect, but keep robots.txt reachable (don’t return 503 for it)Google recommends staying online with limited features; a 503 page is its option for an urgent shutdown of 1–2 days (Google)
Page gone, with no replacementNeither: return 404 or 410Google’s site move guide says removed content should return 404 or 410

The syndication row is the one that changed most since 2012. Google now says: “The canonical link element is not recommended for those who want to avoid duplication by syndication partners, because the pages are often very different. The most effective solution is for partners to block indexing of your content” (troubleshooting; Google News help).

Also gone since 2012: Search Console’s URL Parameters tool. Google deprecated it in 2022 and said its crawlers “will learn how to deal with URL parameters automatically” (Google, 2022).

How to set up a 301 on common platforms

The 2012 post only covered .htaccess. Here’s how to set redirects on the platforms and CDN we see most often:

  • Cloudflare _redirects file (Workers static assets and Pages). One rule per line: /old-page /new-page 301. The default is 302, so always write the code. It allows up to 2,000 static and 100 dynamic redirects (Cloudflare). This site uses it: every old Squarespace URL from our move to Cloudflare is a 301 in one file.
  • Cloudflare Bulk Redirects and Single Redirects (dashboard rules). They default to 301 and allow 301, 302, 307 or 308. Both need the hostname’s DNS record proxied through Cloudflare (Single Redirects settings; Bulk Redirects parameters; Redirects).
  • Squarespace: URL Mappings. One line per redirect: /old-url -> /new-url 301. The old page has to be deleted or disabled first, the homepage / can’t be redirected, and neither can image or file URLs. The field holds up to 400 KB, about 2,500 redirect lines (Squarespace Help).
  • WordPress. The core wp_redirect() function defaults to 302, so pass 301 when the move is permanent, and follow it with exit; because the function doesn’t stop the page by itself (WordPress developer docs). A plugin such as Redirection manages 301s without code.
  • Shopify has built-in URL redirects that send an old path to a new path or URL (Shopify Redirect API).

After you set one up, check two things. First, the redirect itself: curl -sS -D - -o /dev/null https://www.example.com/old-page prints the headers of the first GET response, which should show 301 (or 308) and a location: header with the new URL. Then the destination, with a GET that follows the redirect: curl -sL -o /dev/null -w '%{http_code} %{num_redirects} %{url_effective}\n' https://www.example.com/old-page should print 200 1 and the new URL: one hop, ending on a working page.

To appear as a link in Google’s AI Overviews and AI Mode, a page has to be indexed in Google Search and eligible to show with a snippet, so the rules above apply there too (Google). The crawler docs from OpenAI, Anthropic and Perplexity cover robots.txt but don’t say how their bots handle redirects or canonical tags (OpenAI; Anthropic; Perplexity). Since those pages don’t say, we don’t rely on canonical tags for AI tools on our own site. We give each page one URL, 301 every old address to it, and link to the final URL ourselves. If you want to know whether AI assistants such as ChatGPT and Perplexity recommend your business, our free AI Visibility Check tests that.

Google’s video on redirect types

Google Search Central’s current video on which redirect to use replaces the 2011 Matt Cutts video the old post embedded.

301 redirect and canonical tag FAQ

What is the difference between a 301 redirect and a canonical tag? A 301 redirect sends visitors and search engines from an old URL to a new one, so the old URL stops showing its own content. A canonical tag leaves every URL working and tells search engines which one you’d like them to index. Google treats a canonical as a hint it can overrule.

Is a 301 redirect better than a canonical tag for SEO? Neither is better in general. Google calls a permanent redirect and a canonical tag both strong signals. Use a 301 when the old URL shouldn’t exist any more, and a canonical when visitors still need the duplicate URLs.

Does Google penalize duplicate content? Not ordinary duplicates. Google says some duplicate content on a site is normal and isn’t a violation of its spam policies. Google may still pick a different URL to show than the one you wanted.

Do 301 redirects lose PageRank? No. Google’s site move guide says 301 and other permanent redirects don’t cause a loss in PageRank.

How long should I keep a 301 redirect? Google says to keep redirects as long as possible, generally at least a year, and to consider keeping them indefinitely for visitors who still use old links.

Should syndicated articles use a canonical tag? Not if the goal is to keep the partner’s copy out of Google. Google’s current advice for that is that partner sites block indexing of the copy with a noindex robots meta tag, because syndicated pages are often too different for a canonical to work.

What’s the difference between a 301 and a 302 redirect? A 301 is permanent: Google shows the new URL in results. A 302 is temporary: Google keeps showing the original URL unless other signals point to the new one. For Google’s processing, 308 is treated like 301 and 307 like 302, though the codes differ for other clients.

Sources

  1. Google Search Central, “Redirects and Google Search.” https://developers.google.com/search/docs/crawling-indexing/301-redirects
  2. Google Search Central, “What is URL canonicalization.” https://developers.google.com/search/docs/crawling-indexing/canonicalization
  3. Google Search Central, “How to specify a canonical URL with rel=“canonical” and other methods.” https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
  4. Google Search Central, “Fix canonicalization issues.” https://developers.google.com/search/docs/crawling-indexing/canonicalization-troubleshooting
  5. Google, “How HTTP status codes affect Google’s crawlers.” https://developers.google.com/crawling/docs/troubleshooting/http-status-codes
  6. Google Search Central, “Site moves and migrations.” https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes
  7. Google Search Central Blog, “Demystifying the ‘duplicate content penalty’,” 12 September 2008. https://developers.google.com/search/blog/2008/09/demystifying-duplicate-content-penalty
  8. Google Search Central Blog, “5 common mistakes with rel=canonical,” 8 April 2013. https://developers.google.com/search/blog/2013/04/5-common-mistakes-with-relcanonical
  9. Google Search Central Blog, “Spring cleaning: the URL Parameters tool,” 28 March 2022. https://developers.google.com/search/blog/2022/03/url-parameters-tool-deprecated
  10. Google Publisher Center Help, “Avoid article duplication in Google News.” https://support.google.com/news/publisher-center/answer/9606800
  11. Cloudflare Docs, “Redirects” (Workers static assets). https://developers.cloudflare.com/workers/static-assets/redirects/
  12. Cloudflare Docs, “Bulk Redirects.” https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/
  13. Cloudflare Docs, “Redirects” (Rules). https://developers.cloudflare.com/rules/url-forwarding/
  14. Cloudflare Docs, “Single Redirects settings.” https://developers.cloudflare.com/rules/url-forwarding/single-redirects/settings/
  15. Cloudflare Docs, “URL redirect parameters” (Bulk Redirects). https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/reference/parameters/
  16. Squarespace Help, “URL mappings,” updated 8 September 2026. https://support.squarespace.com/hc/en-us/articles/205815308-URL-mappings
  17. WordPress Developer Resources, “wp_redirect().” https://developer.wordpress.org/reference/functions/wp_redirect/
  18. WordPress.org, “Redirection” plugin. https://wordpress.org/plugins/redirection/
  19. Shopify Dev Docs, “Redirect” (Admin REST API). https://shopify.dev/docs/api/admin-rest/latest/resources/redirect
  20. OpenAI, “Overview of OpenAI Crawlers.” https://developers.openai.com/api/docs/bots
  21. Anthropic, “Does Anthropic crawl data from the web, and how can site owners block the crawler?” https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler
  22. Perplexity, “Perplexity Crawlers.” https://docs.perplexity.ai/docs/resources/perplexity-crawlers
  23. Google Search Central, “AI features and your website.” https://developers.google.com/search/docs/appearance/ai-features
  24. Google, “Managing crawling of faceted navigation URLs.” https://developers.google.com/crawling/docs/faceted-navigation
  25. Google Search Central, “Temporarily pause or disable a website.” https://developers.google.com/search/docs/crawling-indexing/pause-online-business
  26. Google Search Central on YouTube, “301, 302, 307, 308: Which redirect is the chosen one?” https://www.youtube.com/watch?v=vfGGiFQbb7A

Find out how visible you are to AI.

Free. Reviewed by a real person. We check ChatGPT, Claude, Perplexity, Gemini and Grok.