200 Status Code: What HTTP 200 OK Means
Be the first to rate this page
HTTP status code 200 means the server understood the request, accepted it, and is sending back the content that was asked for. Its reason phrase is OK, and it is the code behind almost every web page that loads normally.
A 200 is a statement about the request and the transfer, not a guarantee that the content inside is correct or complete. That gap causes most of the confusion around it.
What is a status code in the first place?
Every time a browser asks a server for something, the server answers with a three-digit number before it sends anything else. That number is the status code, and it tells the browser how to treat what follows.
The first digit sets the family. Codes in the 200s mean success, the 300s mean the thing moved, the 400s mean the request had a problem, and the 500s mean the server had a problem. So 200 is the plainest possible success.
When does a server send status 200?
When the request was valid, the resource exists, the requester was allowed to have it, and the server is now returning it. That covers a page load, an image, a stylesheet, a form submission that succeeded, and an interface returning data.
What comes with the 200 depends on what was asked. A request for a page returns the page. A request that only asks for the headers returns the headers and no body, and still answers 200.
Why does a broken page still return 200?
Because the server decides the code, and many servers are configured to answer 200 for anything they can respond to at all.
Three common cases:
- A page that says the item was not found, but is itself a real page that the server delivered successfully. The words say missing, the code says OK.
- A site that redirects every unknown address to its home page. The home page loads, so the answer is 200 even though the requested thing does not exist.
- A page that loads its content afterwards with scripts. The first response is an empty shell returned with 200, and whatever failed later never changed the code.
The first two are what people mean by a soft 404: content that reads as an error but reports success. Search engines treat these as a problem, because a code of 200 tells them to index a page that has nothing on it.
How do I check what status code a page returns?
- Open the page in your browser.
- Open developer tools. On Windows and Linux this is usually the F12 key; on a Mac it is under the View or Develop menu.
- Select the Network tab.
- Reload the page, because the tab only records requests made while it is open.
- Click the first entry in the list, which is the page itself rather than its images and scripts.
- Read the Status column, or the status line in the Headers panel.
Check the first entry specifically. A page can return 200 while a dozen files inside it return 404, and the address bar shows no sign of it.
How is 200 different from 201, 204 and 304?
- 200 means success with content returned.
- 201 means the request created something new, and is the usual answer when a record has been added.
- 204 means success with nothing to return, used when an action completed but there is no body to send.
- 304 means the content has not changed since the copy the browser already holds, so nothing is resent. It is a success in practice but it belongs to the redirection family.
Seeing 304 instead of 200 during testing is normal and means caching is working. Reload while ignoring the cache if you want to force a fresh 200.
What should I do when I get 200 but the page is empty?
The code has told you the transfer worked, so look at the content rather than the connection.
- View the page source and see whether the body arrived at all. If there is real content in the source but nothing on screen, scripts or styles are the problem.
- Check the Network tab for other entries in the list that failed. A missing script often produces a blank page behind a perfectly good 200.
- Look at the browser console for errors from those scripts.
- Try the same address in a private window, which removes extensions and stale cookies from the picture.
- Try it on a different network or device to tell a local problem from a site-wide one.
What does a 200 mean for search engines?
It means the page is a candidate for indexing. A crawler that receives 200 assumes it received a real page and treats the content as intended to be there.
That is why pages which should be gone need to say so with the right code. A removed page that answers 200 keeps being crawled and can stay in results with an error message as its content. A missing page should answer 404, a permanently removed one 410, and a moved one should redirect.
What a 200 does not tell you
It does not tell you the content is current, the data inside is right, the page rendered, or the action the user wanted actually happened. It says only that the server answered the request and delivered a response.
When you are debugging, treat 200 as the starting point rather than the conclusion: the transfer worked, so the fault is in what was transferred.
Was this page helpful?
Be the first to rate this page