Redirects: 301 vs 302 and how to remove chains
Which redirect type to use, how search engines treat each one, and how to find and fix redirect chains and loops.
A redirect tells browsers and search engines that a URL has moved. The type you choose tells them whether the move is for good, and a careless setup quietly slows a site down. This article is part of the complete technical SEO guide.
The types, and which to use
| Code | Meaning | Use it when |
|---|---|---|
| 301 | Moved permanently | A page, folder or domain has moved for good |
| 308 | Permanent, keeps the request method | The same as 301 where the method must stay the same, for example a POST |
| 302 | Found, temporary | The old URL will come back, such as a short promotion |
| 307 | Temporary, keeps the request method | The same as 302 where the method must stay the same |
Google’s documentation says permanent redirects tell it the target should be the canonical URL, while temporary redirects do not send that signal, so the source page may stay in results. If a move is permanent and the redirect says temporary, search engines may keep the old URL around. Most mistakes are this one.
What Google’s documentation adds
Google’s guide to redirects and Google Search and its site move guidance give these specifics:
- Server-side redirects are the most reliable. 301 and 308 mean permanent. 302, 303 and 307 mean temporary.
- Meta refresh is treated by delay: an instant refresh (0 seconds) is treated as permanent, a delayed one as temporary.
- JavaScript location redirects are a last resort, only when nothing else is possible, because rendering can fail and Google might never see the redirect.
- Use a permanent redirect when you are sure it will not be reverted. Temporary redirects suit short-term situations, such as a service that is briefly unavailable.
- Chains: Googlebot can follow up to 10 hops, but Google asks for chains of ideally no more than 3 and fewer than 5 redirects.
- Do not send many old URLs to one irrelevant page, such as the home page.
- Keep redirects for at least 1 year after a site move.
Redirect in one hop
Every redirect adds a request. A chain is when the first URL goes to a second that goes to a third. A loop is when the path leads back to where it started and never ends. Both come from rules added over time: a protocol switch, a www rule, a trailing-slash rule, then a redesign. The glossary entry on redirect chains defines the problem.
Common chain patterns:
http://example.com/pagetohttps://example.com/pagetohttps://www.example.com/pagetohttps://www.example.com/page/. Fix by sending the first URL straight to the final one.- An old product URL redirected to a URL that was later redirected again.
- A redirect to a URL that returns an error.
Find them
- Crawl the site with a tool that reports redirect hops, and list every URL with more than one hop.
- Check the sitemap and internal links. Any URL listed there that redirects is a fix to make, because links should point at final URLs.
- Read the server logs on a large site to see which redirected URLs bots still request.
- Look at backlinks pointing at redirected URLs, since those paths matter most.
Fix them
- Point every start of a chain straight at the final destination.
- Update internal links, the sitemap, canonicals and hreflang to the final URL so they stop passing through redirects.
- Make the global rules (protocol, host, trailing slash) a single combined rule where your server allows it.
- Break loops by finding the two rules that point at each other.
- Crawl again and confirm.
Where the redirect lives
Redirects can be set in the web server, the application, the CDN or an edge rule. Pick one place per kind of rule, document it, and avoid duplicates. Two layers redirecting the same URL differently is a common cause of loops.
What to avoid
- Redirecting many different pages to the home page. If no equivalent page exists, a proper 404 or 410 is more honest.
- Temporary redirects for permanent moves.
- Redirects as a replacement for fixing internal links.
- Client-side redirects when a server redirect is possible.
This is part of my technical SEO audit support offering, so talk to me and I will have a look.
FAQ
Does a 301 redirect lose rankings?
A correct permanent redirect to an equivalent page is the standard way to move a URL, and search engines are built to follow it. Problems come from redirecting to an unrelated page, long chains, or leaving the redirect out.
Is a JavaScript or meta refresh redirect the same?
No. Server-side redirects are the most reliable. A meta refresh or JavaScript redirect can work, but it is slower and less certain, so use it only when you cannot set a server response.
How do I check a redirect quickly?
Request the URL and read the status code and the Location header. A command-line request that shows headers, or the network tab in your browser, is enough for one URL. A crawler does it for thousands.
Sources
- Redirects and Google Search · Google Search Central
- How HTTP status codes affect Google crawlers · Google Search Central
- Site moves and migrations · Google Search Central
Keep reading
- Technical SEO audit or monthly SEO: which do you need first?How to choose between a one-time technical audit and ongoing monthly SEO, and why an audit usually comes first.
- Core Web Vitals: what to fix firstHow to read the three metrics, where the thresholds are, and an order of work that fixes templates instead of chasing single pages.
- Log file analysis in practiceWhat server logs show that crawlers and reports do not, how to read them step by step, and what to fix once you can see what bots really request.
Related glossary terms
Want this applied to your site?
Tell me about your site and I’ll suggest the next step.
Work with me Services