Why redirects matter
Every redirect is an extra request: a new connection, often a new TLS handshake, more waiting. A typical chain like http://example.com → https://example.com → https://www.example.com quickly costs several hundred milliseconds. A single redirect straight to the final address is better.
The status codes
- 301 and 308: moved permanently. Search engines take over the new address, browsers remember the redirect.
- 302, 303 and 307: temporary. The old address remains the real one.
301 and 302 may turn a form submission (POST) into a normal request (GET), 307 and 308 may not.
Finding loops
If a redirect eventually points back to an earlier address, the browser goes round in circles and reports ERR_TOO_MANY_REDIRECTS. We stop after 10 redirects. A common cause: the server redirects to HTTPS while a CDN like Cloudflare in “Flexible” mode requests the server over HTTP.
Cookies a site sets along the way are sent back to the same domain on the next steps – just like a browser. Some sites would otherwise redirect forever.