DeveloperApr 7, 2026 · Updated Oct 13, 2026 · 7 min read

HTTP Status Codes Cheat Sheet: Every Code Explained

Complete HTTP status codes reference — 1xx to 5xx. Learn what every code means, when servers send them, and how to debug common errors like 404, 403, and 500.

🌐
Try the HTTP Status Codes
Free, no signup
→
DG
Derek Giordano
Designer & Developer
In this guide
01What Are HTTP Status Codes?021xx — Informational Responses032xx — Success Responses043xx — Redirection054xx — Client Errors065xx — Server Errors07Debugging Common Status Codes08Status Codes in API Design09Worked Example: Our Own Site10SEO Impact of Status Codes

What Are HTTP Status Codes?

Every HTTP response includes a three-digit status code that tells the client what happened. The first digit defines the category: 1xx for informational, 2xx for success, 3xx for redirection, 4xx for client errors, and 5xx for server errors.

Status codes are part of the HTTP protocol itself — they're not a framework feature or server-specific convention. Every web server, API, CDN, and browser understands them. When you see a 404 page, your browser received an HTTP response with status code 404 and rendered its error page accordingly.

1xx — Informational Responses

1xx codes indicate the server has received the request and the client should continue or wait. These are rarely seen in everyday development.

100 Continue — the server received the request headers and the client should proceed to send the body. Used when a client sends an Expect: 100-continue header before uploading large payloads.

101 Switching Protocols — the server is switching to a different protocol as requested. This is the standard response when upgrading an HTTP connection to a WebSocket.

103 Early Hints — allows the server to send preliminary headers (like preload links) before the final response. This lets the browser start loading critical resources while the server is still processing the request.

2xx — Success Responses

2xx codes mean the request was received, understood, and processed successfully.

200 OK — the standard success response. The body contains the requested resource (for GET) or the result of the action (for POST).

201 Created — a new resource was successfully created. APIs typically return this after a successful POST request, often including the new resource in the body and its URL in the Location header.

204 No Content — the request succeeded but there's no body to return. Common for successful DELETE requests or PUT updates where the client doesn't need the updated resource echoed back.

206 Partial Content — the server is returning only part of the resource, as requested by the client's Range header. Used for resumable downloads and video streaming.

3xx — Redirection

3xx codes tell the client to look elsewhere for the resource.

301 Moved Permanently — the resource has a new permanent URL. Browsers and search engines update their records. Use this when you've permanently restructured URLs.

302 Found — temporary redirect. The client should continue using the original URL for future requests. Often used during maintenance or A/B testing.

304 Not Modified — the resource hasn't changed since the client's last request (based on cache headers). The browser uses its cached copy, saving bandwidth and load time.

307 Temporary Redirect — like 302, but guarantees the HTTP method won't change. A POST request redirected with 307 stays a POST, whereas 302 might convert it to GET in some browsers.

308 Permanent Redirect — like 301, but preserves the HTTP method. Important for API endpoints that accept POST requests and need to redirect permanently.

4xx — Client Errors

4xx codes indicate the client sent a request the server can't or won't process.

400 Bad Request — the request is malformed. Missing required fields, invalid JSON syntax, or wrong content type. The server can't parse it.

401 Unauthorized — authentication is required but wasn't provided or is invalid. Despite the name, this is about authentication (who you are), not authorization (what you're allowed to do).

403 Forbidden — the server understood the request and the client is authenticated, but the client doesn't have permission. This is about authorization.

404 Not Found — the resource doesn't exist at this URL. The most well-known status code.

405 Method Not Allowed — the HTTP method isn't supported for this endpoint. A POST to a read-only resource, for example.

409 Conflict — the request conflicts with the current server state. Common when trying to create a resource that already exists or updating a resource with stale data.

429 Too Many Requests — the client has exceeded the rate limit. APIs use this with a Retry-After header to tell the client when to try again.

5xx — Server Errors

5xx codes mean the server failed to fulfill a valid request.

500 Internal Server Error — the catch-all server error. Something went wrong, but the server can't be more specific. Check server logs for the actual error.

502 Bad Gateway — the server (acting as a proxy or gateway) received an invalid response from an upstream server. Common when a reverse proxy can't reach the application server.

503 Service Unavailable — the server is temporarily unable to handle requests. Usually due to maintenance or overload. Should include a Retry-After header.

504 Gateway Timeout — the server (acting as a proxy) didn't receive a timely response from the upstream server. The request took too long to process.

Debugging Common Status Codes

Getting a 404? Check the URL for typos, verify the resource exists on the server, and check for trailing-slash mismatches. Many servers treat /page and /page/ as different URLs.

Getting a 403? Verify file permissions on the server, check .htaccess or server configuration rules, and ensure authentication credentials are being sent correctly.

Getting a 500? Check server error logs — the 500 response itself rarely contains useful detail. Common causes are unhandled exceptions, database connection failures, and misconfigured server settings.

Getting a 502 or 504? The application server is likely down or overloaded. Check if the backend process is running, review memory and CPU usage, and verify the proxy configuration points to the correct upstream address and port.

Status Codes in API Design

Well-designed REST APIs use status codes precisely. Return 201 with a Location header for created resources. For a successful delete, 204 if there is no body, or 200 if you return one. Return 422 for validation errors when the syntax is valid but the data isn't (e.g., email format is wrong).

Avoid returning 200 for everything with an error field in the body — this makes it impossible for clients to use standard HTTP error handling. Each status code carries semantic meaning that HTTP clients, monitoring tools, and CDNs rely on.

For paginated responses, 200 is correct even when there are more pages. Use Link headers or response metadata to indicate pagination state.

Worked Example: Our Own Site

We requested a few URLs on this site with curl on October 14, 2026, following redirects and printing every hop:

RequestWhat came back
http://ultimatedesigntools.com/301 to https, one hop
http://www.ultimatedesigntools.com/301 to https://www.ultimatedesigntools.com/, then 301 to the bare domain: two hops (measured Oct 13, 2026)
https://www.ultimatedesigntools.com/301 to the bare domain, one hop
/tools/ai-design-assistant/ (retired tool)301 to /tools/design-system-builder/
/HANDOFF.md (internal file, removed from the site)404
/no-such-page/404
/tools/json-formatter (no trailing slash)200, the same page as with the slash

Every redirect is a single permanent hop except one: http://www. first goes to https://www. and only then to the bare domain, a two-hop chain that comes from the order in which our host applies its HTTPS and domain rules. Removed files return a real 404 rather than a soft 404. The last row is the one to watch: both the slash and no-slash forms of a page answer 200, so search engines see two URLs for one page. Our pages declare the slash version with a canonical link, which tells Google which one to index; a redirect from one form to the other would be cleaner, and we have logged that change. Run the same check on your site with curl -sIL https://example.com/path.

SEO Impact of Status Codes

Status codes directly affect how search engines crawl and index your site. Google treats 301 and 308 as a strong signal that the target should be the canonical URL, and 302 and 307 as a weak one. The choice decides which URL Google is likely to index; use 301 or 308 for permanent moves.

Soft 404s — pages that return 200 but display "page not found" content — are reported in Search Console and left out of the index; return a real 404 or 410 instead.

Google documents that 5xx and 429 responses make Googlebot slow its crawling temporarily, and that URLs which keep returning server errors are eventually dropped from the index. Monitor your error rate and alert on sustained 5xx responses.

Frequently Asked Questions

What is an HTTP status code?+
An HTTP status code is a three-digit number in every server response that tells the client what happened with the request. The first digit indicates the category: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client error), 5xx (server error).
What is the difference between 401 and 403?+
401 Unauthorized means the request lacks valid authentication credentials — the server doesn't know who you are. 403 Forbidden means you're authenticated but don't have permission to access the resource — the server knows who you are but won't let you in.
What is the difference between 301 and 302?+
301 means the move is permanent and 302 that it is temporary. Google treats 301 (and 308) as a strong signal to index the new URL and 302 (and 307) as a weak one. 307 and 308 also guarantee the request method is kept.
What causes a 500 Internal Server Error?+
A 500 error means something went wrong on the server. Common causes include unhandled exceptions in application code, database connection failures, file permission issues, and misconfigured server settings. Check server logs for the specific error.
What is a soft 404?+
A page that returns 200 but shows "not found" content. Google reports soft 404s in Search Console and does not index them. Return a real 404 (or 410 for something removed on purpose) instead.
Try it yourself

Use the HTTP Status Codes — free, no signup required.

⚡ Open HTTP Status Codes
DG
Derek Giordano
Written by the creator of Ultimate Design Tools. BA in Business Marketing.
⚡ Try the free .htaccess Generator →
⚡ Try the free CSP Header Builder →