HTTP status codes
HTTP status codes explained
What each status code means, why it happens and how to fix it, with notes for Laravel and for cPanel / LiteSpeed shared hosting.
2xx Success
- 200 OK The request succeeded and the response body has the result (the page, the JSON, the file).
- 201 Created A new resource was created, usually after a POST to an API. The Location header can point to it.
- 204 No Content The request worked and there is intentionally no body, typical for DELETE or for saving settings.
3xx Redirects
- 301 Moved Permanently The page has a new permanent URL. Browsers and search engines remember it and pass the ranking to the new URL.
- 302 Found (temporary redirect) The page is temporarily somewhere else. Search engines keep the old URL in their index.
- 304 Not Modified The browser's cached copy is still current, so the server sends no body. This saves bandwidth.
- 307 Temporary Redirect Like 302, but the browser must repeat the same method and body (a POST stays a POST).
- 308 Permanent Redirect Like 301, but the method and body must stay the same.
4xx Client errors
- 400 Bad Request The server could not understand the request: broken syntax, invalid JSON, or headers or cookies that are too large.
- 401 Unauthorized Authentication is missing or invalid: no login, an expired session or a wrong API token.
- 403 Forbidden The server understood who you are but refuses the request. On shared hosting this often comes from file permissions or a security rule, not from your app.
- 404 Not Found There is nothing at this URL. Search engines drop 404 pages from their index after a while.
- 405 Method Not Allowed The URL exists, but not for this HTTP method, for example a GET to a POST-only route.
- 408 Request Timeout The client took too long to send the request, so the server closed the connection.
- 409 Conflict The request conflicts with the current state, for example a duplicate entry or an edit based on an old version.
- 410 Gone The page was removed on purpose and will not come back. Search engines drop it faster than a 404.
- 413 Content Too Large The request body is bigger than the server accepts, usually a file upload.
- 415 Unsupported Media Type The server does not accept the request's Content-Type, for example form data sent to a JSON-only API.
- 419 Page Expired A Laravel-specific status: the CSRF token was missing or no longer matched the session, so the form submission was refused.
- 422 Unprocessable Content The request was understood but failed validation. Laravel sends the field errors as JSON.
- 429 Too Many Requests The client sent too many requests in a time window (rate limiting). Retry-After says when to try again.
5xx Server errors
- 500 Internal Server Error Something failed on the server while handling the request. The real error is in the log, not on the page.
- 502 Bad Gateway A proxy or load balancer got an invalid answer from the server behind it, for example PHP-FPM crashed or restarted.
- 503 Service Unavailable The server is temporarily unable to handle the request: maintenance mode or overload.
- 504 Gateway Timeout A proxy waited too long for the server behind it. The request may still finish on the server.
- 508 Resource Limit Is Reached On cPanel shared hosting (CloudLinux / LiteSpeed), 508 means your account hit its resource limit: entry processes, CPU or memory.
