HTTP status codes explained: 200, 301, 404, 500 and more
Every time a browser asks a server for a page, the server replies with a three-digit number before it sends anything else. That number is the status code, and it says whether the request worked, whether the page has moved, or whether something went wrong, and on whose side. Most people only notice the codes they hate, such as 404 and 500. For anyone who runs a website, understanding the full set is a useful skill, because the right code tells search engines how to treat a page and the wrong one can hide pages or waste effort. This guide goes through the five families of code, explains the ones you will meet most often, and gives a practical way to diagnose errors.
The five families
The first digit tells you the family. 1xx codes are informational and rarely seen. 2xx means success. 3xx means redirection: the request needs another step, usually to a different address. 4xx means a client error: the request was wrong or cannot be met. 5xx means a server error: the request seemed fine but the server failed.
Remember the split between 4xx and 5xx. A 4xx suggests the cause is on the visitor's side or in the address they asked for, and a 5xx suggests the cause is on the website's side. In practice, a 404 can result from a mistake on your own site, such as a broken link, so it still needs your attention.
The full list is maintained in public standards. There are many codes, but a handful cover almost everything you will run into.
Success codes: 200, 201 and 204
200 OK is the ordinary success. The server found the page and sent it. This is what you want for every working page. 201 Created is used by programs when a request has made something new, such as a record in a database. 204 No Content means the request worked but there is nothing to send back, which is common for programs that save a setting.
A subtle problem is the soft 404. This is when a page that does not exist returns 200 OK with a message saying not found. A visitor sees an error, but a search engine sees a normal page and may index it. Pages that are gone should return a real 404 or 410.
For ordinary web pages, you want 200 for live pages and an honest error code for everything else.
Redirect codes: 301, 302, 304, 307 and 308
301 Moved Permanently says the page has a new address for good. Browsers and search engines move to the new address and, over time, treat it as the real one. 302 Found is a temporary redirect, used when the move is not permanent. 307 and 308 are the stricter versions of 302 and 301 that keep the method of the request the same, which matters for forms and programs.
304 Not Modified is different. It means the copy the browser already has is still current, so the server does not need to send it again. It speeds up pages and saves data, and it is a sign of good caching. Do not worry if you see many of them.
Use 301 for permanent changes such as a new address after a redesign or a move to HTTPS. Keep chains short, with one hop from the old address to the final one, since each step adds delay and can lose some of the value of the old address. The topic of chains is covered in more detail in our guide to redirects.
Client errors: 400, 401, 403, 404, 410 and 429
400 Bad Request means the server could not understand the request, often because of malformed data. 401 Unauthorized, despite its name, means you need to log in or supply credentials. 403 Forbidden means the server understood but refuses: you are not allowed, even if you log in, or a rule such as a firewall is blocking you.
404 Not Found means there is nothing at that address. It is normal for mistyped addresses, and it is the right response for pages that never existed. 410 Gone is stronger: the page used to exist and has been removed on purpose and will not return. Search engines tend to drop a 410 page from their index a little faster than a 404.
429 Too Many Requests means you have been sending requests too quickly, and the server is asking you to slow down. It is common with programs and with services that limit how often you can call them. A response may include a Retry-After header saying how long to wait.
Server errors: 500, 502, 503 and 504
500 Internal Server Error is the general fault: something went wrong in the website's code or setup and the server cannot say more. The cause is found in the server's error log. A recent change, a plugin update or a full disk are common reasons.
502 Bad Gateway and 504 Gateway Timeout happen when one server acts as a middleman for another and the second one fails to answer properly or in time. They are often seen with proxies, load balancers and content delivery services. 503 Service Unavailable means the server is temporarily unable to handle the request, because it is overloaded or down for maintenance.
For planned maintenance, return 503, ideally with a Retry-After header. This tells search engines that the outage is temporary and they should come back later, rather than treat the pages as gone. If 5xx errors last for days, search engines may start to drop pages from results.
How to check what a page returns
Browsers hide the status code from normal view, so use a tool. A status checker or header viewer fetches the page and shows the code, along with the headers and any redirect steps. Browser developer tools show the same information in the network tab.
Check important pages: the home page, key products or guides, the contact page and your most visited pages. Check both the version with www and without, and both http and https, because each should give a single clean redirect to your preferred address.
Look at your search reports for pages that returned errors when the search engine visited, and at your server logs for a count of codes by day. A sudden rise in 404s after a change usually means links were broken. A rise in 500s means a fault.
A simple diagnosis plan
For a 404 on a page that should exist, check the address for typos, then check whether the page was renamed, deleted or moved, and set up a 301 to the new address if so. Fix internal links that point to old addresses. For a 403, check file permissions, firewall rules and whether a security setting is blocking your own address.
For a 500, look at the error log, undo the last change, and test again. For a 502 or 504, check that the server behind the proxy is running and responding in time. For a 503, check load and whether maintenance mode has been left on.
After fixing, check again with a status checker and make a note of what went wrong. Patterns often show up, such as errors after each update, which tells you to test changes before they go live.
Tools mentioned in this guide
HTTP Status Codes Reference
Search the common HTTP status codes, with a plain explanation of each and when to use it.
Security & webRedirect Checker
Trace every redirect hop and status code for any URL.
Security & webWebsite Status Checker
Find out whether a website is up, how fast it answers and where it redirects.
DeveloperHTTP Header Parser
Break raw HTTP headers into a readable list, with cache, cookie and type details.
SEO & websitesBroken Link Checker
Find dead, redirected and slow links on a page.
Included with UnlimitedSEO & websitesSitemap & Robots.txt Checker
Check the files that tell search engines what to crawl.
Included with UnlimitedFrequently asked questions
What is the difference between a 404 and a 410?
404 means not found, with no information about why. 410 means the page has been removed on purpose and will not return. Both tell search engines the page is not available.
Should a missing page return 200?
No. That is a soft 404. Return a real 404 or 410 so visitors and search engines know the page does not exist.
What does a 503 mean?
The server cannot handle the request for now, usually because of overload or maintenance. Use it for planned downtime with a Retry-After header.
Is a 302 or a 301 better for moving a page?
Use 301 for permanent moves and 302 for temporary ones. Using the wrong one can confuse search engines about which address to keep.
How can I see the status code of a page?
Use a status checker or the network tab in the developer tools of a browser. They show the code and any redirects.