301 or 302: Google clarifies which URL can appear in search results

301 or 302: Google clarifies which URL can appear in search results

A 301 indicates a permanent move; a 302 indicates a temporary one. That difference usually does not change what someone sees when visiting a page, but it does tell Google which URL should represent the content in search results. Gary Illyes and Cherry Prommawin discussed this distinction and the relationship between redirects, page grouping, and canonicalization.

The explanation also needs one clarification: Google does not describe a 302 as an instruction to always ignore the destination URL. Its documentation says that Search follows temporary redirects, but does not use them as a signal that the destination should be canonical; that page can still be indexed if other signals support that choice. The distinction matters when deciding whether a page is being moved or traffic is being diverted only for a limited period.

A redirect communicates intent

A 301 indicates that the URL has changed permanently and that the destination should take the source page’s place in search results. A 302 communicates that the change is temporary and that the previous URL is expected to return. From a visitor’s perspective, both codes can lead to another page; for Search, they do not express the same preference about which one should appear.

Google recommends a server-side permanent redirect when you want to change the URL shown in search results. For a temporary interruption, a temporary redirect can send users to an informational page without Google interpreting the detour as a preference to replace the original URL. The deciding factor is the actual purpose of the change, not which code seems more convenient for rankings.

“First of all, relax. No matter which redirect you choose, one of your pages will stay in search and be part of AI training. There are technically correct choices, but getting it wrong is not the end of the world. Google will still index a page. It’s really just a matter of which URL will show up.”

— Cherry Prommawin, Google

Prommawin’s reassurance does not make the codes interchangeable: the main consequence is which version can represent the content. In Google’s documentation, permanent redirects are a clear signal in favor of the destination as canonical; temporary redirects are followed, but do not send that same signal. The decision can therefore affect the visible URL even if the content remains available to Search.

Grouping pages is not the same as choosing a canonical

Illyes and Prommawin described two related stages. First, Google groups pages whose main content is identical or very similar. Then it chooses a representative URL from that set: the canonical. A redirect can help establish the relationship between the URLs, but whether it is permanent or temporary influences which one is proposed as the representative.

According to the explanation reported by Search Engine Journal, both 301 and 302 redirects can help Google group similar URLs; a 301 also has a canonicalization effect. Google’s documentation offers a compatible nuance: temporary redirects are followed, but the indexing process does not use them as a signal that the destination should be canonical. The destination URL could still be indexed if other signals point in that direction.

Canonicalization does not mean deleting the other pages. Google defines the canonical URL as the version it considers most representative of a set of duplicates. It may show a duplicate variant if it better matches the search, and the versions not selected can continue to exist as alternatives. An old URL may also occasionally appear after a domain change while users get used to the new name.

This behavior puts the so-called “content cannibalization” into context. Search Engine Journal argues that similarity does not mean Google stops ranking every page in a group: Search can group them and select one as the representative. The official documentation describes this process and notes that Google evaluates which version is the most complete and useful. On its own, it does not support a universal explanation for why a particular page does not appear in search results; a lack of distinctiveness or thin content are issues separate from choosing a canonical URL.

A 301 does not replace a coherent migration

Google says that when it selects a canonical, it can group signals from duplicate pages—for example, links pointing to different URLs—and associate them with the representative URL. Search Engine Journal attributes a more definitive explanation to Illyes: with a 301, Google takes the ranking signals from the old page and passes them to the new one. The official documentation consulted presents permanent redirects as a clear signal for canonicalization and as a way to consolidate signals; it does not describe the transfer as a guarantee that every signal will be transferred in full in every case.

For teams migrating a site or consolidating several URLs, the operational implication is to align the signals. Redirects should lead to the URL you want to keep; internal links should point to that version, and the sitemap should include the preferred URLs. Google says redirects carry more weight than rel="canonical" annotations, and those carry more weight than inclusion in a sitemap. Combining consistent signals increases the likelihood that the desired URL will be selected.

There are also limits: a canonical preference is a suggestion, not an absolute instruction. Google may select another URL based on the signals it finds during indexing. Keeping contradictory versions—for example, redirecting to one URL while declaring another as canonical—makes it harder to communicate which page should represent the content. The documentation recommends not specifying different canonicals through different methods.

When 307 and 308 matter

Codes 308 and 307 serve permanent and temporary functions, respectively, comparable to those of 301 and 302. Illyes explained that the relevant difference is how information sent with a POST request is handled. In the example he presented, if a payment server temporarily redirects a transaction to another server, a 307 preserves the POST request and its data; the behavior described for a 302 may lose that data.

In Search, Google classifies 308 as permanent and 307 as temporary. A 308 can work as a permanent alternative to a 301; a 307 retains the temporary meaning of a 302. So choosing between them is not just an SEO decision: in workflows that receive data sent from the browser, request behavior also comes into play. The specific use case and how the application processes the request should guide the choice.

Why Google prefers server-side redirects

Illyes recommended server-side HTTP redirects over JavaScript or meta refresh redirects. The reason given is that a server redirect provides a direct instruction, whereas the browser must download the page, interpret its code, and execute the mechanism that sends it to another URL. Google also recommends HTTP redirects so that the change is detected more quickly.

That does not mean JavaScript or meta refresh are always useless. Google’s documentation recognizes alternatives: it interprets an instant meta refresh as permanent and a delayed one as temporary; it can also process JavaScript redirects during rendering. But it considers them less likely to be interpreted correctly than server redirects. If your hosting allows you to configure an HTTP response, that is the preferred option.

For developers and businesses, the final criterion is straightforward: if the page has moved permanently, use a permanent redirect and make the other signals point to the same destination; if the detour is temporary, preserve the temporary intent. The choice determines which URL is proposed for Search, how the versions are related, and, in certain POST workflows, whether the submitted information is preserved.

Sources: Search Engine Journal, Google for Developers, Google for Developers, Google for Developers