See the difference between 301, 302, 307 and 308 redirects as an animated request→response sequence. Permanent vs temporary and POST method preservation made visual.
Scenario
Requests
6
Current step 15/15
200 OK
The result page answers normally.
Arrow color = status class. The key redirect pair: 301 is 'permanent', 307 'keeps the method'. Notice how cheap the second request is when the cache validates (304).
All status codes
1xx Informational
2xx Success
3xx Redirection
4xx Client error
5xx Server error
An HTTP redirect is the server answering 'not here — go there instead'. Instead of a page it returns a Location header with the new URL, and the browser re-issues the same request automatically. The user just sees the address bar change, but two full request-response round trips happened.
The four codes split along two axes. 301/308 mean 'permanent' — browsers, CDNs and search engines may remember it and skip the old URL next time, while 302/307 are 'temporary' so the original is always re-checked. Search ranking transfers through 301, which makes it the only correct choice for domain moves and URL migrations.
The other axis is method preservation. For historical reasons, 301/302 conventionally rewrite a POST into a GET on retry — the body is lost. 307/308 explicitly require the method and body to survive. If a form POST or API call may cross a redirect, use 307/308 or expect silent data loss. HTTP Status Playground