Troubleshooting

HTTP status codes explained: what each one means on a web server

A practical reference to HTTP status codes from 1xx to 5xx: what triggers each one on Apache, Nginx and LiteSpeed, how they affect SEO and caching, and where to look when you see them.

BeginnerAll websites3 min read

Every HTTP response starts with a three-digit status code that tells the browser, search engines and caches what happened. Knowing what each code means on a web server, and which layer produced it, is the fastest way to diagnose a broken page. This reference covers the codes you will actually meet.

Before you start

The five classes

ClassMeaning
1xxInformational: request received, continue
2xxSuccess
3xxRedirection: look elsewhere or use your cached copy
4xxClient error: the request was wrong or not allowed
5xxServer error: the server failed to fulfil a valid request

2xx success codes

  • 200 OK: normal success.
  • 201 Created: an API created something (after POST).
  • 204 No Content: success with an empty body, common for APIs and CORS preflights.
  • 206 Partial Content: a range of a file, used for video seeking and resumable downloads.

3xx redirect codes

CodeMeaningSEO effect
301Moved permanentlyPasses ranking signals to the new URL; cached by browsers
302Found (temporary)Original URL stays indexed
304Not ModifiedNo body; browser reuses its cached copy
307Temporary, method keptLike 302 but POST stays POST
308Permanent, method keptLike 301 but POST stays POST

Too many redirects in a chain, or a loop, end in a browser error. See fix too many redirects.

4xx client error codes

  • 400 Bad Request: malformed request, oversized cookies or headers.
  • 401 Unauthorized: login required (HTTP auth or API token missing).
  • 403 Forbidden: the server refuses: file permissions, Require all denied, an IP block, or a WAF/ModSecurity rule.
  • 404 Not Found: no file or route for that URL. Check the path, rewrite rules and that the document root is right.
  • 405 Method Not Allowed: e.g. POST to a URL that only accepts GET.
  • 408 Request Timeout: the client was too slow sending the request.
  • 410 Gone: removed on purpose; search engines drop it faster than a 404.
  • 413 Content Too Large: upload above client_max_body_size or LimitRequestBody. See fix 413 errors.
  • 414 URI Too Long: giant query strings, often from redirect loops appending parameters.
  • 429 Too Many Requests: rate limiting kicked in (Nginx rate limiting).

5xx server error codes

CodeTypical causeWhere to look
500 Internal Server ErrorPHP fatal error, broken .htaccess, bad permissionsSite error log, PHP error log
502 Bad GatewayPHP-FPM or backend crashed, wrong socket, not runningWeb server error log, systemctl status php-fpm
503 Service UnavailableOverloaded, maintenance, resource limits reached, app pool stoppedServer load, LiteSpeed/CloudLinux limits
504 Gateway TimeoutBackend too slow; proxy timeout reachedSlow log, timeouts (timeout tuning)
508 Resource Limit ReachedCloudLinux entry-process limit on shared hostingcPanel → Resource Usage

Which layer produced the error?

  • Look at the Server header and the page style: a Cloudflare-branded page means the CDN generated it (and the origin may be the problem behind it).
  • A plain Nginx/Apache/LiteSpeed page usually means the web server itself or its backend failed.
  • A themed page from your CMS means the app is running and returned the code itself.

Status codes and SEO

  • Use 301 for moved pages and 410 for content deleted for good.
  • Never return 200 for "page not found" content (a soft 404).
  • During maintenance return 503 with Retry-After, not 200 or 404. See custom error pages.
  • Many 5xx errors over days can make search engines crawl less and drop pages.

FAQ: HTTP status codes

What is the difference between 401 and 403?

401 means "log in first"; 403 means "you are not allowed, even if logged in".

Is a 304 an error?

No. It saves bandwidth by telling the browser its cached copy is still valid.

Why do I get 503 only at busy times?

The site hits worker or resource limits. Add caching or more resources.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.