Skip to content

08Website know-how & errors

HTTP status codes explained – 404, 500, 503 & more

All important HTTP status codes from 1xx to 5xx plus Cloudflare errors 520–526 – what they mean, what causes them on Nexthosting web hosting and what you can do.

In short

Every response from a web server begins with a three-digit code. The first digit tells you what is going on: 2xx = all good, 3xx = redirected, 4xx = error on your side (request, permissions, missing page), 5xx = error at the server. This page explains every important code, the most common cause on web hosting and the first step toward a fix.

When your browser requests a page, the server first sends a status line such as HTTP/2 404. After that come headers and the content. You can see the code in your browser’s developer tools (F12 key, “Network” tab) or with curl:

Terminal window
curl -I https://meinprojekt.de/
curl -sI -o /dev/null -w "%{http_code}\n" https://meinprojekt.de/unterseite

The first command shows all headers, the second only the number.

Class Meaning Who is “to blame”?
1xx Information, processing in progress Nobody, rarely seen
2xx Success –
3xx Redirect A rule or plugin redirects
4xx Error in the request Wrong address, missing permissions, block
5xx Error in the server Script, configuration or load
What kind of code do you see?
Code Name Meaning
100 Continue The server has received the headers; the client should send the rest. Runs invisibly.
101 Switching Protocols Switch of protocol, e.g. to WebSocket.
103 Early Hints The server sends hints in advance about which files the page needs.

You do not have to do anything. Troubleshooting starts at 4xx and 5xx.

Code Name Meaning
200 OK The page was delivered. All good.
201 Created Something was newly created, e.g. through an interface (API).
204 No Content Successful, but without content.
206 Partial Content Only part of the file, e.g. in video streaming.

A redirect sends the browser to a different address. This is intended for http to https or for moved pages, and unintended in loops.

Code Name Meaning Permanent? Method kept?
301 Moved Permanently The page has moved. Search engines adopt the new address. Yes May become GET
302 Found Temporarily elsewhere. Search engines keep the old address. No May become GET
303 See Other After a form: fetch the target page with GET. No Becomes GET
304 Not Modified The page has not changed; the browser uses its stored copy. – –
307 Temporary Redirect Temporary; method and content stay the same. No Yes
308 Permanent Redirect Permanent; method and content stay the same. Yes Yes
  • 301 or 302? For “this page is moving for good” use 301, for “briefly under maintenance” use 302.
  • 304 is not an error. It shows that caching works (Understanding caching).
  • Too many redirects in a row produce “ERR_TOO_MANY_REDIRECTS” (redirect loop). See Error 404 and redirects.

The server understood the request but cannot or will not fulfil it.

Code Name Meaning Common cause on web hosting First step
400 Bad Request The request is malformed. Corrupt cookies, address too long, badly built request Delete the site’s cookies, check the address
401 Unauthorized Login required or wrong. Password protection (.htpasswd) or wrong credentials Check your credentials
403 Forbidden Access forbidden. Wrong file permissions, .htaccess block, security rule (WAF) Error 403
404 Not Found The address does not exist. Typo, deleted page, missing permalink rules Error 404
405 Method Not Allowed Method (e.g. POST) not allowed. Form submits to the wrong address, rule blocks it Check the form’s target and method
406 Not Acceptable The server cannot deliver the requested format. Security rule blocks the request Send the time and address to support
408 Request Timeout The client was too slow. Unstable connection Reload, use another connection
409 Conflict Conflict with the state of the data. Simultaneous changes Reload, try again
410 Gone Page was removed on purpose. Your own rule or plugin Tells search engines: “page is gone for good”
413 Payload Too Large Upload too large. upload_max_filesize or post_max_size too small Make the file smaller or adjust the PHP values in the web panel
414 URI Too Long Address too long. Very long parameters Shorten the request
415 Unsupported Media Type File type not allowed. Upload of a blocked type Choose another format
418 I’m a teapot Joke code, rarely used. – –
421 Misdirected Request Wrong server for this domain. Domain not assigned to the website Check the domain in the web panel
429 Too Many Requests Too many requests in a short time. Security or rate limiting, bots, plugin loop Wait, find the trigger
431 Request Header Fields Too Large Headers or cookies too large. Too many or too large cookies Delete cookies
451 Unavailable For Legal Reasons Blocked for legal reasons. Legal block –

The most important 4xx codes in everyday use

Section titled “The most important 4xx codes in everyday use”
  • 404 is the most common. It is not a server outage, it just means “there is nothing at this address”.
  • 403 has many possible sources: file permissions, .htaccess, a security rule. A 403 can also come from a security rule of the server that wrongly considers a request dangerous. In that case support can help: send them the time and the address.
  • 429 limits automated queries. The cause is sometimes bots, sometimes your own services asking too often.

Here your request is not wrong; something on the server or in your website is. On shared hosting, a look at the error log helps.

Code Name Meaning Common cause on web hosting First step
500 Internal Server Error General error. PHP error in the code, broken .htaccess, faulty plugin, memory limit Error 500
501 Not Implemented Function not available. Unusual method Rare, contact support
502 Bad Gateway An upstream service returned nonsense. PHP process crashed, redirect to a service Reload, check plugins/scripts
503 Service Unavailable Service currently unavailable. Maintenance mode, overload, maintenance on the server Wait briefly, look at the status page
504 Gateway Timeout The service did not answer in time. Very slow script, large import, slow database Speed up the script, check the time limit
505 HTTP Version Not Supported Protocol version not supported. Outdated client Rare
507 Insufficient Storage No storage space. Storage full Free up space
508 Loop Detected Loop detected. Rewrite loop Check .htaccess

The codes 520 to 526 do not exist in the HTTP standard. They come from Cloudflare, an intermediary service (CDN) that some websites use. You only see them if your domain runs through Cloudflare. They tell you at which point between Cloudflare and your server something goes wrong.

Code Name Meaning What you can check
520 Web Server Returned an Unknown Error Server responds unexpectedly. Error log, PHP errors, redirect rules
521 Web Server Is Down Server does not accept connections. Is the website running? Status page, firewall
522 Connection Timed Out Timeout while connecting. Server overloaded or blocking Cloudflare addresses
523 Origin Is Unreachable Server not reachable. DNS in Cloudflare points to the wrong address
524 A Timeout Occurred Server answered too late. Slow script, long queries
525 SSL Handshake Failed Encryption between Cloudflare and server fails. Check the certificate on the server
526 Invalid SSL Certificate Server certificate invalid. Renew the certificate, check mode “Full” instead of “Full (strict)”

Cloudflare has several SSL modes. If the mode does not match the certificate on your server, 525/526 or redirect loops result. A valid certificate must exist on the server itself; more in SSL certificates and HTTPS.

Where a status code originates
  1. Browser sends a requestGET /page
  2. Optional: Cloudflare or another intermediary52x errors originate here
  3. Web server (Apache)301/302/403/404, rules from .htaccess
  4. PHP and database500/502/504 on script errors
  5. Response with status code
Terminal window
# Just the code
curl -s -o /dev/null -w "%{http_code}\n" https://meinprojekt.de/
# Follow redirects and show every step
curl -sIL https://meinprojekt.de/ | grep -E "^HTTP|^location"

In the browser: F12, Network tab, reload the page, Status column.

Individual 404 pages are normal. The problem is many important pages suddenly returning 404. Redirect moved pages with 301.

The address, the status code, the time and what you changed beforehand. More in Describing errors well.

Then it was usually a brief overload or a script that was just restarting. If it happens repeatedly, check the error log.