Redirect chains explained: 301, 302, 307 and 308
Ce contenu est en anglais.
A redirect sends a visitor or a search engine from one address to another. Used well, redirects keep old links working after a site change. Used badly, they create chains that slow pages down, loops that never finish and duplicate addresses that split your search visibility. This guide explains what each redirect code means, how chains and loops form, how to choose one canonical address for your site and how to check the path with the redirect checker on Valtrinity.
The four redirect codes you will meet
A redirect is a response with a status code in the 300 range, plus a new address. A 301 means the move is permanent, and search engines usually transfer the old address signals to the new one. A 302 means the move is temporary, so the original address is expected to return. A 307 is a temporary redirect that also insists the browser uses the same method, such as GET or POST, for the new request. A 308 is the permanent version of 307.
In everyday use, most owners only need 301 for permanent moves and 302 for temporary ones. The 307 and 308 codes matter mainly for forms and APIs, where the method must not change.
- 301: permanent move.
- 302: temporary move.
- 307: temporary, and the method must stay the same.
- 308: permanent, and the method must stay the same.
What a redirect chain is
A chain is a sequence of two or more redirects before the final page loads. An old address redirects to an intermediate address, which redirects again to the current address. Each step adds a round trip, so the page takes longer to appear. Search engines also follow chains, but they may stop before reaching the end, which can leave the final page unindexed.
Chains usually grow over time. A site moves from http to https, then from one domain to another, then to a new URL structure, and each change adds a link to the chain instead of replacing the old one.
- A chain is two or more redirects before the final page.
- Each step adds delay.
- Chains grow when each change is layered on the last.
Worked example: flattening a chain
Suppose an old article address redirects to a path with an older slug, which redirects again to the current address. The visitor passes through two redirects before reaching the page. Using the redirect checker, you can see each hop. Flatten the chain by pointing the first address directly at the final page, so there is only one redirect.
After the change, check the result again. The checker should show a single 301 to the final address. Then check a second old link to make sure it also points straight to the destination.
- Trace the hops with the redirect checker.
- Point the first address straight at the final page.
- Check the result shows a single redirect.
Redirect loops
A loop happens when address A redirects to B and B redirects back to A. The browser gives up after a few attempts and shows an error. Loops often come from conflicting rules, such as one rule forcing https and another forcing a trailing slash that the first rule then removes.
The fix is to find the rule that sends the visitor back, and remove or narrow it. Test with the redirect checker, which reports loops clearly.
- A loop sends the visitor between two addresses forever.
- Conflicting rules are the usual cause.
Choose one canonical address
A canonical address is the one version you want people and search engines to use. For most sites, that means one of the four combinations of http or https with or without www, and only one of them. Choose the https address, and then choose whether www is in the address. Redirect every other version to the chosen one with a single 301.
Pick a version and stick with it. Then update your internal links and sitemap to use the same address. Links pointing to the non-chosen version force a redirect every time, which adds delay and can dilute signals.
- Choose https as the standard.
- Choose www or the bare domain, and use it everywhere.
- Update internal links and the sitemap to match.
Check the path after each change
After any change to the site, test the old and new addresses with the redirect checker. Look at the codes, the number of hops and the final address. Check the http version of the homepage as well, because it is a common source of forgotten redirects.
- Test old and new addresses.
- Count the hops and check the final address.
- Include the http homepage in the test.
Outils cités dans ce guide
Redirect Checker
Trace every redirect hop and status code for any URL.
Sécurité et webWebsite Status Checker
Find out whether a website is up, how fast it answers and where it redirects.
SEO et sites webSitemap & Robots.txt Checker
Check the files that tell search engines what to crawl.
Inclus avec UnlimitedQuestions fréquentes
Should I use 301 or 302 for a permanent move?
Use 301 for a permanent move. A 302 suggests the original address will return, so search engines may keep the old address in their index for longer.
How many redirects are too many?
Ideally none beyond the single redirect to the final address. Each extra hop adds a delay, and browsers stop after a set number of hops, so a chain can end in an error.
Do redirects lose search visibility?
A well-planned permanent redirect usually passes most of the value to the new address. Chains, loops and redirects to unrelated pages make the transfer less reliable, so keep the redirects simple.
Does a redirect change the address in the browser?
Yes, for most redirects the browser shows the final address. A 307 or 308 redirect keeps the method, which matters for forms, while a 301 or 302 may change a form submission to a plain page request.