HTTP Status Codes Reference

Search by number, name or meaning to find out what a code such as 404 or 503 tells you, and when a website or service should send it.

Deze inhoud is in het Engels.

    Uitgewerkte voorbeelden

    Looking up a missing page

    404 in the search box

    404 Not Found: the address was not found on the server.

    A 404 is the usual reply for a link that points to a page that no longer exists.

    Looking up a permanent move

    301 in the search box

    301 Moved Permanently: the page has a new address, and the old one should redirect to it.

    Use 301 when a page has permanently moved, so search engines pass the old address to the new one.

    Over HTTP Status Codes Reference

    Every time a browser asks a web server for a page, the server replies with a status code, a three-digit number that says how the request went. A reply of 200 means everything worked, while 404 means the address could not be found and 503 means the server is temporarily unavailable. These numbers appear in browser error pages, server logs, monitoring tools and the error messages of many apps, so knowing what they mean makes problems much easier to solve.

    The codes are grouped by their first digit. Codes from 100 to 199 are information replies, 200 to 299 mean success, 300 to 399 mean the page has moved or needs a different request, 400 to 499 point to a problem with the request itself, and 500 to 599 point to a problem on the server. This reference lists the codes you are most likely to meet, with a plain explanation of each and a note on when a website or service should send it. Search by number, by name or by a word from its meaning.

    Zo gebruikt u HTTP Status Codes Reference

    1. Type a code, a name or a word such as redirect or too many into the search box.
    2. Use the group list to show only redirects, client errors or server errors.
    3. Read the explanation and the Use when note for each matching code.
    4. Check the number of matching codes shown above the list, and clear the search to see every code.

    Veelvoorkomend gebruik

    • Working out why a page shows an error after a site move
    • Choosing the right code for an API that returns validation errors
    • Reading server logs and understanding which requests failed and why
    • Explaining a status code to a colleague or to a support customer

    Veelgestelde vragen

    What is the difference between a 301 and a 302 redirect?

    A 301 redirect tells browsers and search engines that a page has moved for good, so they should update their links and use the new address from now on. A 302 redirect says the move is temporary, so the original address may come back. Use 301 for permanent changes such as a new domain, and 302 or 307 for short-term moves like a maintenance page.

    Why does my site show a 500 error?

    A 500 Internal Server Error means something went wrong on the server, but the server did not say what. The cause is usually a bug in the application, a missing configuration setting or a failing database connection. Look at the server error log for the detailed message, because the status code alone does not say which part failed.

    What is the difference between 401 and 403?

    A 401 Unauthorized reply means the request lacks valid login details, so the user should sign in or send a correct key. A 403 Forbidden reply means the server knows who the user is, or does not need to know, and still refuses access. Signing in again will not change a 403 response, because the permission itself is missing.

    What should I do when I receive a 429 Too Many Requests response?

    A 429 response means you have sent too many requests in a short period. Wait for the time given in the Retry-After header, if one is present, and then try again. If you are building software that calls an API, slow down the rate of requests and add a pause that grows after each failure, which is usually called backing off.

    Is a 404 always a problem?

    A 404 is not always a fault, but it is worth checking. It shows that the address does not exist, which might be a broken link, a mistyped address or a page that was removed. Many sites show a custom 404 page to help visitors find what they wanted. If you expected the page to exist, fix the link or set up a 301 redirect to its new address.

    Gidsen