An HTTP redirect is a server response with a 3XX status code and a Location header that sends a browser or crawler from one URL to another [2][11]. Search engines treat redirects as signals about which URL should be shown: a permanent redirect (301 or 308) strongly suggests the target is the canonical URL, while a temporary one (302 or 307) suggests the original should stay [1].
- Use 301 or 308 for moves that won’t be undone; 302 or 307 only when the old URL will return [1].
- Google prefers server-side redirects; meta refresh and JavaScript are fallbacks [1].
- Googlebot follows up to 10 hops before reporting a redirect error [6].
- Keep redirects from a site move live for at least a year [8].
1Overview
Redirects exist so that a URL can keep working after content moves. A server answers the request with a 3XX status code and the new address in the Location header, and the client requests that address instead [2][11].
For search engines, redirects do two jobs: they lead crawlers to the new URL, and they tell Google which URL to treat as canonical. Google lists redirects as a strong canonicalisation signal, alongside rel="canonical"[7].
2History
The 301 Moved Permanently and 302 Moved Temporarily codes were defined in HTTP/1.0 in 1996 [3]. Because many clients changed a POST request to a GET when following a 302, HTTP/1.1 in 1999 added 303 See Other and 307 Temporary Redirect to make the behaviour explicit [4].
The permanent counterpart that preserves the request method, 308 Permanent Redirect, was standardised in 2015 [5]. All of these are now defined together in RFC 9110, published in 2022 [2].
3Status codes
| Code | Name | Permanent? | Method kept? | Google treats as |
|---|---|---|---|---|
| 301 | Moved Permanently | Yes | Not guaranteed | Strong canonical signal for target [1] |
| 308 | Permanent Redirect | Yes | Yes | Same as 301 [1] |
| 302 | Found | No | Not guaranteed | Weak signal; source may stay canonical [1] |
| 307 | Temporary Redirect | No | Yes | Same as 302 [1] |
| 303 | See Other | No | Changes to GET | Temporary [1] |
4Ways to redirect
Google lists its preferred methods in order [1]:
- Server-side redirects (HTTP 3XX): the clearest signal, seen by every client before any content loads [1].
- Meta refresh: an instant meta refresh is interpreted as a permanent redirect, a delayed one as temporary [1].
- JavaScript redirects: only seen after the page is rendered, so use them only when server-side redirects aren’t possible [1][13].
Browsers may also redirect internally. When a site uses HTTP Strict Transport Security, the browser upgrades http requests to https itself, before contacting the server [10]. This doesn’t remove the need for a real 301 from http to https for crawlers and first-time visitors.
5How Google processes redirects
Googlebot follows redirects as part of crawling. It follows up to 10 hops; if it doesn’t receive content within that limit, Search Console reports a redirect error [6].
A redirect whose final target returns an error is treated as that error, so the original URL’s signals are lost [6]. Google then picks a canonical among the URLs involved, using the redirect type together with other signals [7][12].
6Chains and loops
A redirect chain is a sequence of redirects, A → B → C, usually created by successive migrations or overlapping rules for protocol, host, case and trailing slashes. Each hop adds a round trip for users and another fetch for crawlers.
A redirect loop, A → B → A, never resolves; browsers stop with an error. The remedy for both is the same: rewrite each rule to point directly at the final URL, so every old URL resolves in one hop.
7Site migrations
For a move that changes URLs, Google recommends preparing a mapping from every old URL to its new equivalent, implementing permanent server-side redirects, and updating internal links, canonical tags and sitemaps to the new URLs [8].
Google advises keeping the redirects for as long as possible, generally at least a year, so that signals are transferred and users with old links still arrive [8]. For a move to a new domain, the Change of Address tool in Search Console tells Google about the move directly [9].
8Redirect, canonical or 404?
9Common misconceptions
| Belief | What the sources say |
|---|---|
| 301 and 302 are the same to Google | Permanent is a strong canonical signal, temporary a weak one [1] |
| JavaScript redirects are as good as server-side | They depend on rendering; server-side is preferred [1][13] |
| Redirects can be removed after a few weeks | Keep them at least a year after a move [8] |
| HSTS replaces the http → https redirect | HSTS acts in the browser only, after a first visit [10] |
See also
- Redirects guide: diagrams and quick fixes
- Search indexing: how redirects feed canonical selection
- Internal links: why links should point at final URLs
- Broken Link Checker: trace redirect chains on one page
References
- [1]“Redirects and Google Search”. Google Search Central. developers.google.com/search/docs/crawling-indexing/301-redirects
- [2]“RFC 9110: HTTP Semantics: Redirection 3xx”. IETF, June 2022. www.rfc-editor.org/rfc/rfc9110#name-redirection-3xx
- [3]“RFC 1945: Hypertext Transfer Protocol: HTTP/1.0”. IETF, May 1996. www.rfc-editor.org/rfc/rfc1945
- [4]“RFC 2616: Hypertext Transfer Protocol: HTTP/1.1”. IETF, June 1999. www.rfc-editor.org/rfc/rfc2616
- [5]“RFC 7538: The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)”. IETF, April 2015. www.rfc-editor.org/rfc/rfc7538
- [6]“How HTTP status codes and network errors affect Google Search”. Google Search Central. developers.google.com/search/docs/crawling-indexing/http-network-errors
- [7]“How to specify a canonical URL with rel="canonical" and other methods”. Google Search Central. developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
- [8]“Site moves with URL changes”. Google Search Central. developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes
- [9]“Change of Address tool”. Search Console Help. support.google.com/webmasters/answer/9370220
- [10]“RFC 6797: HTTP Strict Transport Security (HSTS)”. IETF, November 2012. www.rfc-editor.org/rfc/rfc6797
- [11]“Redirections in HTTP”. MDN Web Docs. developer.mozilla.org/en-US/docs/Web/HTTP/Redirections
- [12]“What is URL canonicalization”. Google Search Central. developers.google.com/search/docs/crawling-indexing/canonicalization
- [13]“Understand the JavaScript SEO basics”. Google Search Central. developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics