Redirect chain checker
How many redirects stand between your address and the page, and are they permanent?
- Checks your page
- Reads:Server response
- 2 rules
- Last updated
What we keep
The result appears here
Enter your page’s address and press “Check the page”. This is what the tool runs on it:
- A chain of redirects before the pagenot started
- A temporary redirect for a move made for goodnot started
What it checks
- How many redirects the address takes before the page answers: more than one is a chain, and Google advises redirecting to the final address at once.
- Each redirect's status: a move to HTTPS, or between
example.comandwww.example.com, made with a temporary302,303or307rather than a permanent301or308.
Example
HTTP/1.1 302 Found Location: https://www.example.com/ HTTP/1.1 301 Moved Permanently Location: https://www.example.com/ar/ HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8
HTTP/1.1 301 Moved Permanently Location: https://www.example.com/ar/ HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8
How to fix
In the wrong example, https://example.com/ goes to www with a temporary redirect, then to /ar/ with another. Send it to the final address at once, with a permanent redirect. In nginx, in the server block of example.com:
- In nginx,
rewritewith itsredirectflag answers302: usereturn 301, or thepermanentflag. - In Apache (mod_rewrite), the
Rflag alone answers302: write[R=301,L]. - Use the final address wherever you control it, in your links, your sitemap and your canonical links, so no one needs the redirects at all.
- A temporary redirect has its uses, such as to a language chosen by the visitor's browser: this check fails only moves to HTTPS or between a name and its
www.
location = / {
return 301 https://www.example.com/ar/;
}
location / {
return 301 https://www.example.com$request_uri;
}FAQ
Because the address you gave answered with the page itself, without a redirect: there is nothing to check. Try the address your visitors type, such as http://example.com.
No. One redirect, such as from HTTP to HTTPS, passes; the check fails from two. A first redirect that only moves the address to HTTPS on the same name is not counted, since the HSTS preload list asks for it. Google's crawlers follow up to 10 redirects in a chain, and Google advises redirecting to the final address directly.
A 302 says the move is temporary, so clients ought to keep using the old address. Google takes a permanent redirect as a strong signal that the new address should be canonical, and a temporary one as a weak signal, and a move to HTTPS is made for good.
No, it follows HTTP redirects alone: 301, 302, 303, 307 and 308.
What this tool runs
- A chain of redirects before the pageminor
redirect-chain - A temporary redirect for a move made for goodminor
redirect-temporary
How we measure
We fetch the address you give as ArablyzerBot and follow its HTTP redirects, up to 10, reading each site's robots.txt before we follow a redirect to it. We keep each redirect's address and status, in order, and the address of the page they lead to. The chain fails from two redirects before a page that answers with a 2xx status, not counting a first redirect that only moves the address to HTTPS on the same name. Each 302, 303 or 307 fails when it only moves the scheme from http: to https:, only moves between a name and its www., or both, keeping port, path and query. The same address gives the same result on every check, as long as the server answers the same.