Interactive HTTP Status Codes Reference & Header Tester
Comprehensive directory of 1xx to 5xx response codes with official RFC 9110 specifications, caching directives, real-world troubleshooting guides, and instant client-side header simulation.
Forbidden
Protocol Specifications & Meaning
Indicates that the server understood the request but refuses to authorize it. Unlike 401 Unauthorized, re-authenticating with the same credentials will make no difference because the user's role, IP, WAF, or scopes do not have permission for the resource.
Typical Root Causes
- •User is authenticated, but lacks 'admin' or required RBAC permission scope.
- •CORS Preflight origin blocked or forbidden.
- •Cloudflare WAF / AWS Shield IP geo-blocking rule triggered.
- •Missing CSRF token on state-changing POST request.
- •File permission 403 Forbidden on Linux Nginx (worker user cannot read static folder).
Standard Troubleshooting & Fixes
Wire HTTP Response Preview
HTTP/1.1 403 Forbidden Content-Type: application/json Content-Length: 104 { "error": "forbidden", "message": "You lack the required 'billing:write' permission scope." }
Backend Implementation Snippets
if (!req.user.roles.includes('admin')) {
return res.status(403).json({ error: 'Insufficient permissions' });
}Raw HTTP Response Header Simulator
Paste and parse raw HTTP response headers to test caching, security headers, and CORS compliance in real time.
OK
Recognized standard RFC response code
Actively cacheable (3600s browser, 86400s shared CDN). Stale responses tolerated for 60s while revalidating in background.
Security & Hardening Headers Audit
max-age=63072000; includeSubDomains; preload
Missing. Crucial for defending against cross-site scripting (XSS) and unwanted injection scripts.
nosniff
DENY
strict-origin-when-cross-origin
Configured: '*' (Wildcard allows all websites)
Parsed Headers Breakdown (10)
| Header Key | Value | RFC Explanation |
|---|---|---|
| Date | Sun, 11 Oct 2026 21:30:00 GMT | Standard HTTP response header |
| Content-Type | application/json; charset=utf-8 | MIME media type and character encoding of response body payload. |
| Cache-Control | public, max-age=3600, s-maxage=86400, stale-while-revalidate=60 | Defines browser and CDN caching policies, TTL, and revalidation instructions. |
| ETag | W/"68a41bf-304e" | Entity tag used as fingerprint for conditional cache validation (304 Not Modified). |
| Vary | Accept-Encoding | Standard HTTP response header |
| Strict-Transport-Security | max-age=63072000; includeSubDomains; preload | Enforces HTTPS connections, prevents SSL-stripping man-in-the-middle attacks. |
| X-Content-Type-Options | nosniff | Prevents MIME-sniffing vulnerabilities (recommended: 'nosniff'). |
| X-Frame-Options | DENY | Defends against clickjacking by controlling whether site can be framed. |
| Referrer-Policy | strict-origin-when-cross-origin | Regulates how much referrer information is sent along with outbound requests. |
| Access-Control-Allow-Origin | * | Cross-Origin Resource Sharing (CORS) access control parameter. |
403 Forbidden vs. 401 Unauthorized
The most common status code dilemma in REST API design: Authentication (Who are you?) versus Authorization (What can you do?).
"I do not know who you are!"
Credentials are completely missing, expired, or cryptographically invalid. The client is unauthenticated.
"I know who you are, but you cannot enter!"
The user is authenticated, but their identity lacks the required permission scope, role, or IP clearance.
Common Production Bug to Avoid:
Returning 403 when a user has no JWT token at all prevents frontend Axios/fetch interceptors from detecting an unauthenticated session, leaving the user stuck on a blank forbidden page instead of redirecting them to /login! Always return 401 for missing/expired tokens.
How to Debug & Fix 502 Bad Gateway
Step-by-step resolution checklist for Linux, Nginx, Docker, Node.js, and Cloudflare.
Verify if your Node.js, Python, or PHP process is actively running:
systemctl status my-app pm2 status docker ps
Confirm the app is actively bound to the port Nginx proxies to (e.g. 3000):
ss -tulpn | grep :3000 netstat -tulpn | grep 3000
Read the exact connection refusal error in Nginx system logs:
tail -f /var/log/nginx/error.log # Look for "(111: Connection refused)"
On RHEL/CentOS, SELinux prevents Nginx from connecting to TCP ports by default:
setsebool -P httpd_can_network_connect 1 chmod 755 /var/run/app.sock
The Redirect Matrix: 301 vs. 302 vs. 307 vs. 308
How HTTP redirection affects HTTP method preservation (POST to GET mutation) and SEO link equity.
| Status Code | Permanence | POST Method Preserved? | Browser Cache | SEO PageRank Equity |
|---|---|---|---|---|
| 301 Moved Permanently | Permanent | NO (Mutates POST to GET) | Heavily Cached | 100% Passes Link Equity |
| 302 Found | Temporary | NO (Mutates POST to GET) | Not Cached by default | Retained on Source URL |
| 307 Temporary Redirect | Temporary | YES (Strictly stays POST) | Not Cached | Retained on Source URL |
| 308 Permanent Redirect | Permanent | YES (Strictly stays POST) | Heavily Cached | 100% Passes Link Equity |
HTTP Status Code Selection Wizard
Interactive decision tree to determine the exact semantically correct HTTP status code for your API endpoints.
Step 1: Was the client request processed successfully?
RFC 9110 & 9111 Semantics
Strictly conforms to current IETF HTTP standards, clarifying caching behavior, safe/idempotent contracts, and protocol edge cases.
Actionable Root Cause Analysis
Clear diagnostic trees for critical production errors including 401 vs 403 permissions, 502 Bad Gateway proxy drops, and 504 timeouts.
Zero Input Uploads & Local Execution
Header inspection and status code evaluation run 100% in your browser memory. No tokens, cookies, or payloads are dispatched to external servers.
HTTP Status Codes & Response Headers Cheat Sheet — Reference Guide
Definitive HTTP/1.1, HTTP/2, and HTTP/3 response status codes directory with RFC 9110 semantics, caching directives, and troubleshooting guides.
Master HTTP Status Codes Quick Reference Table
Core HTTP status codes across 2xx Success, 3xx Redirection, 4xx Client Error, and 5xx Server Error classes, RFC standards, and caching semantics.
| Status Code | Reason Phrase | Class | RFC Spec | Cacheable? | Primary Meaning & Operational Handling |
|---|---|---|---|---|---|
| 200 | OK | 2xx Success | RFC 9110 §15.3.1 | Yes (default) | Request succeeded; entity payload returned in response body. |
| 201 | Created | 2xx Success | RFC 9110 §15.3.2 | Yes | New resource successfully created; URI typically returned in Location header. |
| 204 | No Content | 2xx Success | RFC 9110 §15.3.5 | Yes | Action succeeded; response body intentionally empty (common for DELETE/PUT). |
| 301 | Moved Permanently | 3xx Redirection | RFC 9110 §15.4.2 | Yes (default) | Target resource assigned permanent new URI; search engines transfer link equity. |
| 302 | Found (Temp Redirect) | 3xx Redirection | RFC 9110 §15.4.3 | No (unless header) | Resource temporarily resides at different URI; client keeps requesting original URL. |
| 304 | Not Modified | 3xx Redirection | RFC 9110 §15.4.5 | N/A | Conditional GET match (ETag / If-Modified-Since); client uses local cached copy. |
| 307 | Temporary Redirect | 3xx Redirection | RFC 9110 §15.4.8 | No | Redirect with guaranteed method preservation (POST remains POST, not GET). |
| 308 | Permanent Redirect | 3xx Redirection | RFC 9110 §15.4.9 | Yes (default) | Permanent redirect with guaranteed method preservation across redirects. |
| 400 | Bad Request | 4xx Client Error | RFC 9110 §15.5.1 | No | Malformed syntax, invalid JSON schema, or missing mandatory query parameters. |
| 401 | Unauthorized | 4xx Client Error | RFC 9110 §15.5.2 | No | Authentication required; client must provide valid Bearer token or credentials. |
| 403 | Forbidden | 4xx Client Error | RFC 9110 §15.5.4 | No | Authenticated identity lacks RBAC permissions to access resource; do not retry. |
| 404 | Not Found | 4xx Client Error | RFC 9110 §15.5.5 | Yes | Origin server cannot find current representation for target resource. |
| 409 | Conflict | 4xx Client Error | RFC 9110 §15.5.10 | No | State conflict (e.g. unique constraint violation, optimistic lock mismatch). |
| 429 | Too Many Requests | 4xx Client Error | RFC 6585 §4 | No | Rate limit quota exceeded; client must back off until Retry-After timestamp. |
| 500 | Internal Server Error | 5xx Server Error | RFC 9110 §15.6.1 | No | Unhandled server-side runtime exception or backend service crash. |
| 503 | Service Unavailable | 5xx Server Error | RFC 9110 §15.6.4 | No | Server temporarily overloaded or down for scheduled maintenance. |
Key Parameters & Controls
| Parameter | Type / Unit | Description | Default |
|---|---|---|---|
| Status Code Search | string / number | Filter HTTP status codes by exact integer code (e.g. 404, 502) or reason phrase semantics. | 403 |
| Status Class Filter | string | Narrow down status codes by 1xx (Informational), 2xx (Success), 3xx (Redirection), 4xx (Client Error), 5xx (Server Error), or Edge proxy codes. | all |
| Cacheability Filter | string | Filter by RFC 9111 HTTP caching properties: Cacheable, Non-cacheable, or Conditional responses. | all |
Pro Tips & Best Practices
Published in June 2022, RFC 9110 is the current authoritative standard, superseding older RFC 7231 and RFC 2616 across HTTP/1.1, HTTP/2, and HTTP/3.
Always return 401 when the client is unauthenticated and include a WWW-Authenticate header. Return 403 when the client is authenticated but lacks required permission scopes.
All header simulation and decision wizard calculations run entirely in browser memory. No authorization tokens, cookies, or request data leave your device.
Common Gotchas & Troubleshooting
⚠️502 Bad Gateway vs 504 Gateway Timeout in Reverse Proxies
A 502 means the upstream service crashed, terminated connection, or sent malformed headers. A 504 means the upstream service is alive but failed to reply before the proxy read timeout expired.
⚠️Browser Redirect Caching Issues with 301 and 308
Both 301 (Moved Permanently) and 308 (Permanent Redirect) are aggressively cached by modern browsers indefinitely. During development or API migration, use 302 or 307 temporary redirects.
Frequently Asked Questions
Why does RFC 9110 replace older RFC 7231 and RFC 2616?▼
RFC 9110 provides an unambiguous, unified specification for HTTP semantics across transport layers (TCP and QUIC). It harmonizes caching rules in RFC 9111 and clarifies method idempotency.
Why should 401 Unauthorized always send WWW-Authenticate?▼
RFC 9110 §15.5.2 mandates that origin servers send a WWW-Authenticate challenge header in 401 responses, specifying the accepted authentication scheme (e.g., Bearer, Basic, DPoP) to enable automated client token renewal.
What is the difference between 301 Moved Permanently and 308 Permanent Redirect?▼
RFC 7231 allows clients to rewrite a POST method to GET following a 301 redirect. RFC 7538 established status code 308 to strictly preserve the original HTTP method and request body for permanent redirects.
Are response headers inspected safely in this tool?▼
Yes. This tool operates 100% client-side ('use client'). No headers, cookies, API tokens, or server endpoints are ever transmitted to any remote logging server.
Related Tools & Utilities
All Tools →Check HTTP status codes, test redirect chains, and inspect response headers. Diagnose 1xx to 5xx error codes, RFC specifications, SEO impact, and fixes.
Analyze raw Nginx and Apache access logs locally with status code distributions, top requested URLs, unique client IPs, bandwidth metrics, and custom regex pattern matching.
Convert cURL shell commands into idiomatic Golang net/http client requests with headers, cookies, and JSON payloads.
Convert cURL HTTP requests into clean, native Ruby code using Net::HTTP, URI, Faraday, and JSON request/response handling.
Decode 3, 4, 5, and 6-band resistor color codes with tolerance, TCR drift, E-series matching, and SMD equivalents per IEC 60062.
Generate modern Caddy 2 server configurations with reverse_proxy, automatic HTTPS, compression, security headers, and basicauth.