Compare HTTP Status Codes

Select up to 3 status codes to compare side-by-side

๐Ÿ“ฆ301Moved Permanently
๐Ÿ”€302Found
โ†ช๏ธ307Temporary Redirect

Redirect Codes: Permanent vs Temporary

Understanding the key differences between redirect types

Permanent Redirects
๐Ÿ“ฆ
301
Moved Permanently
Old-Style Permanent

Classic redirect

Resource has permanently moved. Browsers and search engines will update their bookmarks and indexes.

๐ŸŒPOST /old-url
Server responds with new location
โ†“
๐Ÿ“ฆ301 โ†’ /new-url
โš ๏ธ May change to GET
Key behavior:
  • Browser caches the redirect
  • SEO: Link juice transferred
  • โš ๏ธ May change POST to GET
๐Ÿ“
๐Ÿ”’
308
Permanent Redirect
Modern Permanent

Method-preserving

Like 301, but guarantees the HTTP method and body won't change during redirect.

๐ŸŒPOST /old-url
Server responds with new location
โ†“
๐Ÿ”’308 โ†’ /new-url
โœ“ Keeps POST method
Key behavior:
  • Browser caches the redirect
  • SEO: Link juice transferred
  • โœ“ Preserves HTTP method
๐Ÿ”
Temporary Redirects
๐Ÿ”„
302
Found
Old-Style Temporary

Classic temporary

Resource is temporarily at another location. Original URL should still be used in the future.

๐ŸŒPOST /temp-moved
Server responds with temp location
โ†“
๐Ÿ”„302 โ†’ /temp-url
โš ๏ธ May change to GET
Key behavior:
  • No browser caching
  • SEO: Original URL preserved
  • โš ๏ธ May change POST to GET
โฑ๏ธ
๐Ÿ”ƒ
307
Temporary Redirect
Modern Temporary

Method-preserving

Like 302, but guarantees the HTTP method and body won't change during redirect.

๐ŸŒPOST /temp-moved
Server responds with temp location
โ†“
๐Ÿ”ƒ307 โ†’ /temp-url
โœ“ Keeps POST method
Key behavior:
  • No browser caching
  • SEO: Original URL preserved
  • โœ“ Preserves HTTP method
๐Ÿ”„
Quick Decision Guide
Use Permanent (301/308) when:
  • URL has changed forever
  • You want search engines to update their index
  • Domain migration or restructuring
  • Old URL should never be used again
Use Temporary (302/307) when:
  • Resource is temporarily unavailable
  • A/B testing or maintenance mode
  • You want to keep the original URL active
  • Redirect might change or be removed soon
Use Modern (307/308) when:
  • Redirecting POST/PUT/DELETE requests
  • Request body must be preserved
  • Working with REST APIs
  • Modern application with strict HTTP semantics
๐Ÿ’ก
Key Insight

Permanent vs Temporary controls caching and SEO, while Old vs Modern controls HTTP method preservation. For APIs and POST requests, prefer 307/308. For simple page redirects, 301/302 are widely supported and sufficient.

Description

The URL of the requested resource has been changed permanently. The new URL is given in the response.

When to Use
  • The resource URL has changed permanently and will never return
  • You want search engines to update their index to the new URL
  • Consolidating multiple URLs to a canonical URL for SEO
Common Causes
  • Website restructured with new URLs
  • Domain name changed
  • Page permanently relocated
Description

The URI of the requested resource has been changed temporarily.

When to Use
  • Legacy compatibility - prefer 307 for temporary redirects in new code
  • The redirect is temporary and the original URL should continue to be used
  • Warning: Historically changed POST to GET; behavior varies by client
Common Causes
  • Temporary maintenance redirect
  • A/B testing redirects
  • Temporary URL changes
Description

The server sends this response to direct the client to get the requested resource at another URI with the same method.

When to Use
  • Temporary redirect that must preserve the HTTP method (POST stays POST)
  • Redirecting form submissions or API calls temporarily
  • Preferred over 302 for modern applications
Common Causes
  • HTTPS redirect preserving POST data
  • Temporary URL change keeping method
  • Load balancing redirects