HTTP Redirect Status Codes (3xx)
Comprehensive guide to HTTP 3xx redirect codes: when to use 301 vs 302 vs 307 vs 308, SEO implications, and browser behavior.
Comprehensive guide to HTTP 3xx redirect codes: when to use 301 vs 302 vs 307 vs 308, SEO implications, and browser behavior.
A guide to the 3xx redirection codes (300, 301, 302, 303, 304, 307 and 308) with when to use each, an example and notes, followed by best practices on redirect chains, caching and SEO.
| Code | Name | When to use | Example | Notes |
|---|---|---|---|---|
| 300 | Multiple Choices | Request has multiple possible responses; user or agent should choose one. | Server can serve content in multiple formats/languages; returns list of options. | Rarely used; most servers return 200 or 404 instead |
| 301 | Moved Permanently | Resource has new permanent URL; update bookmarks/links; SEO link equity transfers. | HTTP/1.1 301 Moved Permanently\nLocation: https://example.com/new-path | Cached by browsers and search engines; GET/HEAD may change to GET; POST becomes GET (not guaranteed) |
| 302 | Found (Temporary Redirect) | Resource temporarily at different URI; keep original URL in future requests. | HTTP/1.1 302 Found\nLocation: /login?next=/dashboard | Original method may change to GET (historical); use 307 for method preservation |
| 303 | See Other | Redirect after POST to GET (Post/Redirect/Get pattern); response to request is at different URI. | After form submission: HTTP/1.1 303 See Other\nLocation: /thank-you | Always converts request to GET regardless of original method |
| 304 | Not Modified | Conditional GET request; resource cached and unchanged; no body sent. | Request: If-None-Match: "abc123"\nResponse: HTTP/1.1 304 Not Modified | Uses ETag or Last-Modified headers; saves bandwidth; browser uses cached copy |
| 307 | Temporary Redirect (Strict) | Temporary redirect preserving HTTP method and body (POST stays POST). | HTTP/1.1 307 Temporary Redirect\nLocation: https://api.example.com/v2/endpoint | Must not change method; modern replacement for 302 when method preservation matters |
| 308 | Permanent Redirect (Strict) | Permanent redirect preserving HTTP method (POST→POST); SEO-safe permanent. | HTTP/1.1 308 Permanent Redirect\nLocation: https://example.com/new-api-endpoint | Like 301 but method/body preserved; RFC 7538; widely supported in modern browsers |
The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.
| Section | Field | Type | Example |
|---|---|---|---|
| redirect_codes | code | integer | 300 |
| redirect_codes | name | string | Multiple Choices |
| redirect_codes | when_to_use | string | Request has multiple possible responses; user o… |
| redirect_codes | example | string | Server can serve content in multiple formats/la… |
| redirect_codes | notes | string | Rarely used; most servers return 200 or 404 ins… |
| best_practices | * | array | [10 items] |
The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.
curl "https://yjtoon.yunusemrevurgun.com/api/dataset/http-redirect-status-codes?format=toon"
const res = await fetch( "https://yjtoon.yunusemrevurgun.com/static-data/dataset/http-redirect-status-codes.toon" ); const toon = await res.text();
Rate limit: 120 requests per minute per IP, no key and no signup. API reference →