In beta, with limited placesOpen to everyone in Q1 2027

↑↓ to move · Enter to open · Esc to close

Crawling and indexing

What is a 301 redirect?

A 301 redirect is the server response that says a URL has moved permanently to another address, given in the Location header. The browser takes the person to the new URL without them doing anything, and Google reads it as a signal that the new URL is the one to index and show in its results.

Written by
Reviewed by
Published 8 min read
Takeaway:

Key takeaways

  • A 301 says "I've moved for good"; a 302 or a 307 says "I'm away for a while." Google shows the destination with the first and keeps the origin with the others.
  • For Google, a permanent redirect is a signal of which URL is the canonical one.
  • Redirect to the equivalent page, not to the homepage: many old URLs sent to a destination unrelated to them can be treated as soft 404s.
  • Google asks you to keep redirects for at least a year and for chains to run no more than three hops.
  • On Shopify you can only redirect from a broken URL: a page that is still published will not redirect even if you create the rule.

A 301 redirect is what keeps an old link from ending in "page not found." In a store you need it more often than it seems: a product changes its name and with it its URL, a product page is discontinued, two categories merge, the store changes platform. It has nothing to do with the redirection of an affiliate link: it is a server response with a specific code. For the buyer, the difference between a 301 and a 404 is arriving or not arriving. For Google, the redirect says which URL it should show from now on, and that is why a badly placed 301 gets paid for in indexing.

How it works

The 301 code is defined by the HTTP standard, today RFC 9110, published in 2022: the resource has moved to a new, permanent URL, and the client should use that address in its future requests. The new URL travels in the Location header, and the response can be cached even if nobody says so.⁠[1]IETF (Fielding, Nottingham and Reschke). RFC 9110: HTTP Semantics The same standard defines its relatives. The 308 is also permanent, but it requires repeating the request with the same method, so a submitted form is still a submission, whereas with a 301 the client may change a submission into a plain page request. The 302 and the 307 are temporary: they do not say the resource has moved.⁠[1]IETF (Fielding, Nottingham and Reschke). RFC 9110: HTTP Semantics

Google groups redirects by what they mean to it, not by number:⁠[2]Google Search Central. Redirects and Google Search

Type How it is done What Google does
Permanent 301, 308, meta refresh at 0 seconds, a JavaScript location change Follows the redirect, takes the destination as the URL that should be canonical and shows it in results⁠[2]Google Search Central. Redirects and Google Search
Temporary 302, 303, 307, meta refresh of more than 0 seconds Keeps the origin URL in results; the destination can be indexed if other signals support it⁠[2]Google Search Central. Redirects and Google Search

That signal is the same one the canonical tag pursues: that a single URL counts. Google prefers redirects done on the server and leaves JavaScript ones for when there is no other option, because if rendering fails it may never see them. And it warns of an effect that throws people off: the old URL can keep showing for a while as an alternate name after a permanent redirect, and stops on its own over time.⁠[2]Google Search Central. Redirects and Google Search

In Search Console, the old URL appears in the indexing report as "Page with redirect": a non-canonical page that redirects to another and will not be indexed. The destination may or may not be indexed, depending on what Google thinks.⁠[3]Search Console Help. Page indexing report The redirect picks the URL; it does not guarantee the destination makes it into the index.

When what changes is many URLs at once, Google's migration guide adds three rules. Keep redirects as long as possible, generally at least a year. Keep chains short: ideally no more than 3 hops, and fewer than 5. And do not send many old URLs to a single destination unrelated to them, such as the homepage, because it confuses people and can be treated as a soft 404 error. A small or medium site can take a few weeks to see most of its pages on the new URLs, and a large one longer.⁠[4]Google Search Central. Site moves with URL changes

In a store

A fictitious example: a tea store renames a teapot and with it its URL. This is how the old address responds when viewed with curl, which shows the response without following the redirect:

$ curl -I https://store.example/products/iron-teapot-06l
HTTP/2 301
location: https://store.example/products/cast-iron-teapot-06l

Two lines are enough: the code says the change is permanent and location says where to. What they do not say is whether the destination is the right one, and that decision is made URL by URL:

What happened (fictitious example) Old URL Response
The teapot is renamed /products/iron-teapot-06l 301 to the new URL of the same product
A tea is discontinued and has a successor /products/sencha-2025 301 to the successor's page
A tea is discontinued with nothing equivalent /products/limited-edition-tea A 404; sending it to the homepage can be treated as a soft 404⁠[4]Google Search Central. Site moves with URL changes
Two categories merge /collections/japanese-green-tea 301 to the collection that brings the two together

On Shopify, redirects are created from the menus section of the admin (Content › Menus › View URL Redirects), one by one or by importing a CSV, and they take effect immediately. Three platform rules change what you can do. You can only redirect from a broken URL, one that shows "page not found" or a 404: if the old page is still published, the rule does not work. You cannot redirect the fixed paths /products, /collections and /collections/all, nor those that start with prefixes such as /cart, /orders or /apps. And the maximum is 100,000 redirects, or 20,000,000 on the Plus plan. Shopify also warns that URLs with parameters may not work as expected, and that browsers and search engines cache 301s: if you delete one that has already been used, it may keep working for that person until it expires.⁠[5]Shopify Help Center. URL redirects

When you change the handle of a Shopify collection, the admin offers a checkbox to create the redirect from the previous URL, so that anyone arriving by an old link does not end up on a 404. Shopify also asks you not to change the handle often, because the collection could stop appearing in search engine results.⁠[6]Shopify Help Center. Managing collection settings

Warning:

What people often get wrong

Sending everything that disappears to the homepage seems prudent, and it is not. Google asks you not to redirect many old URLs to a single destination unrelated to them, such as the homepage of the new site: it confuses whoever arrives and can be treated as a soft 404, that is, as if the page did not exist.⁠[4]Google Search Central. Site moves with URL changes A redirect makes sense when the destination answers what whoever asked for the old URL was looking for; if there is nothing equivalent, the 404 is the honest response.

How to check it

  1. Request the old URL with curl -I and look at the first two lines: the code has to be 301 or 308, and the Location header has to carry the destination URL.⁠[1]IETF (Fielding, Nottingham and Reschke). RFC 9110: HTTP Semantics A 302 or a 307 tells Google the change is temporary.⁠[2]Google Search Central. Redirects and Google Search
  2. Follow the whole chain with curl -sIL and count the hops. The ideal is 3 or fewer, and never 5 or more.⁠[4]Google Search Central. Site moves with URL changes If the URL has changed several times, make all the old ones point directly to the last one.
  3. Open the destination and check that it responds with a 200 and that it is the same product or its replacement, not the homepage or a generic category.⁠[4]Google Search Central. Site moves with URL changes
  4. Update the internal links and the XML sitemap so they point to the new URL. Google asks you to replace in your own links all the URLs that change and to submit the new sitemap in Search Console.⁠[4]Google Search Central. Site moves with URL changes
  5. Inspect both URLs in Search Console. The old one should show as "Page with redirect" and the new one, in time, as indexed.⁠[3]Search Console Help. Page indexing report

The 302 is the temporary redirect, and it gets confused with the 301 because for the person browsing there is no difference: both take them to the destination. For Google there is. With a permanent one, it shows the destination in results; with a temporary one, it keeps the origin URL in results, and the destination is only indexed if other signals support it.⁠[2]Google Search Central. Redirects and Google Search The rule is the standard's: the 302 is for a resource that is somewhere else for a while and will come back; the 301, for one that has moved.⁠[1]IETF (Fielding, Nottingham and Reschke). RFC 9110: HTTP Semantics A renamed page is not going back to its old URL, so its redirect is a 301. If both URLs have to stay open, for example a product page seen from within a collection, the tool is a different one: the canonical, which redirects no one.

To go further, the entry on crawling vs indexing explains why a redirected URL is crawled but not indexed, and the crawling and indexing reading path orders the rest of the terms.

Synonyms

English
301 redirect, permanent redirect
Español
redirección permanente, redirect 301

Sources

  1. [1] IETF (Fielding, Nottingham and Reschke). RFC 9110: HTTP Semantics. Accessed . ↑ ↑ ↑ ↑
  2. [2] Google Search Central. Redirects and Google Search. Accessed . ↑ ↑ ↑ ↑ ↑ ↑
  3. [3] Search Console Help. Page indexing report. Accessed . ↑ ↑
  4. [4] Google Search Central. Site moves with URL changes. Accessed . ↑ ↑ ↑ ↑ ↑ ↑
  5. [5] Shopify Help Center. URL redirects. Accessed . ↑
  6. [6] Shopify Help Center. Managing collection settings. Accessed . ↑

Change history

  • First English version.

This definition is published under CC BY 4.0. Reuse this definition freely, crediting Clione with a link to this page.

Make your catalog easy for bots to read

Clione fills every product page with what bots read best: the JSON-LD graph with its structured data, the meta description and the FAQs. You review and press Push; then we check your live store so it all stays published.