The web HTTP redirects 2 min read
What happens when a link redirects?
You open an old help link. The address bar ends up on a new URL. Who told the browser where to go?
-
The first server sends a destination
The browser requests the old help page. The server responds with a redirect status, such as
301, and aLocationheader naming the new URL. The response gives the browser a next destination.In short Read the redirect status and the Location header together.
-
The browser makes another request
The browser follows the redirect by requesting the new URL. That URL may be a different path or a different website. If you’re deciding whether to sign in, check the destination shown after the redirect.
In short A redirect creates another request to a new destination.
Where this applies
A redirect does not vouch for its destination. Redirect status codes can also differ in whether they preserve the original request method.
Keep this
Check where the browser ends up.
For an unexpected redirect, trace each Location header to the final destination.