Guide
How to read a redirect chain
Every hop in a redirect chain is a status code, a Location header and a decision someone made. Once you can read one, most redirect problems are easy to spot.
A redirect chain is the list of requests a browser or crawler makes before it reaches a page. You type example.com, and before anything appears, the server may have answered "go to https", then "go to www", then "add a trailing slash". Each answer is one hop.
The Robotto checker shows these chains in each row's details. Here's how to read them.
The parts of a hop
Every redirect response has two things that matter: the status code, which says what kind of redirect it is, and the Location header, which says where to go next.
http://example.com/ 301 Location: https://example.com/
https://example.com/ 301 Location: https://www.example.com/
https://www.example.com/ 200
Three requests, two redirects, one final page. The first line is the http-to-https upgrade, the second is the move to www, and the third is the page itself.
Location can be relative (/new-page/) or absolute (https://www.example.com/new-page/). Relative locations are resolved against the URL that was just requested, so a relative redirect from http:// stays on http. That's a common reason for an extra hop.
What the status codes mean
| Code | Name | Permanent? | Method kept? | Use it for |
|---|---|---|---|---|
| 301 | Moved Permanently | Yes | Browsers may change POST to GET | Site moves, http to https, host changes |
| 308 | Permanent Redirect | Yes | Yes | Same as 301, when the method must stay the same |
| 302 | Found | No | Browsers may change POST to GET | Short-term moves, login redirects |
| 307 | Temporary Redirect | No | Yes | Same as 302, when the method must stay the same |
| 303 | See Other | No | Changes to GET | After a form submission |
For search engines the important split is permanent versus temporary. A permanent redirect tells them to replace the old URL with the new one in their index and pass along its signals. A temporary one says the old URL is still the real address. Google says it treats long-lasting temporary redirects as permanent eventually, but there's no reason to make it guess. Site-wide moves should use 301 or 308.
Patterns that cause trouble
Too many hops
Each hop is another round trip, often 50 to 300 milliseconds, before the visitor sees anything. Google's documentation says its crawler follows up to 10 hops and then reports a redirect error, and for robots.txt it follows at least five. In practice, any chain longer than two for your home page is worth fixing.
Temporary redirects for permanent moves
A 302 from http to https is very common because some hosting panels default to it. It works, but it sends the wrong signal.
Loops
/a redirects to /b and /b redirects back to /a, often because two systems each think they own the rule. Browsers give up with "too many redirects". The checker stops and reports a loop.
Protocol ping-pong
http to https, then back to http on another host, then to https again. This usually means a CDN and an origin server disagree about whether the connection is secure. The origin sees plain http from the CDN and redirects to https, the CDN passes the request through again, and the chain grows.
Redirects to the home page
When a removed page redirects to the home page, search engines usually treat it as a soft 404. The chain ends in a 200, but the old page's value is lost anyway.
A chain that ends in an error
The last hop returns 404 or 500. The redirect itself is fine, but its target is broken. This happens when a redirect map points at pages that were later deleted.
Things that look like redirects but aren't
HSTS
If a site sends Strict-Transport-Security, browsers remember it and switch to https before sending any request. Developer tools show this as a 307 "Internal Redirect", but your server never sent it. Crawlers that don't keep HSTS state still see your real http response. Robotto fetches without HSTS memory, so you see what the server actually does.
Meta refresh and JavaScript redirects
A page can return 200 and then send the browser elsewhere with <meta http-equiv="refresh"> or window.location. Google can follow these, but they're slower and less reliable than an HTTP redirect, and many other crawlers ignore them. The checker reports HTTP redirects only, so a chain that ends in 200 on an unexpected page may be one of these.
Shortening a chain
The goal is one hop from any wrong address to the right one. Start from the final URL and work backwards:
- Write down the final address you want, including the host, protocol and trailing slash style.
- For each wrong version, change the rule so it redirects straight to that final address, instead of fixing one thing at a time.
- Put the rules in one place. If a CDN handles https and the origin handles www, move both into the CDN.
- Use absolute
Locationheaders withhttps://so the next hop doesn't drop back to http. - Re-run the check and confirm each chain is one redirect followed by a 200.
Reading Robotto's details panel
Each row in the checker has four chains, one for each combination of http, https, www and the bare domain. Each hop shows its status code, the URL requested, and how long the server took to answer. A colored pill marks 2xx in green, 3xx in amber and errors in red. If a hop was refused because it pointed at a non-standard port or a private address, the chain ends there and the reason is shown.
When all four chains end on the same address with one redirect at most, the Canonical column is green and there's nothing to do.