X
X
X
X

Knowledge Base

HomepageKnowledge BaseGeneralHTTP Status Codes Explained: What 3...

HTTP Status Codes Explained: What 301, 404, 500 and 503 Mean

In short: HTTP status codes are the three-digit responses a server returns for every request, and they show whether the request succeeded. The first digit gives the class: 2xx success, 3xx redirection, 4xx client error and 5xx server error. The codes you will see most are 200, 301, 404, 500 and 503, and you can check a page's code in your browser's developer tools or with the curl -I command.

What are HTTP status codes?

When your browser requests a page, the server sends back a status line along with the content. The three-digit number in that line is the status code. RFC 9110 groups status codes into five classes by their first digit:

HTTP status codes diagram: a browser request, 200 OK, 301, 404 and 503 response cards and curl -I output

ClassMeaning
1xxInformational: the request was received and is being processed
2xxSuccessful: the request was received, understood and accepted
3xxRedirection: another address is needed to complete the request
4xxClient error: something is wrong with the request or the resource was not found
5xxServer error: the request was valid but the server could not respond

The status code and what you see on screen do not always tell the same story. Some sites, for example, return a "page not found" message with a 200 code, and Google reports this in Search Console as a soft 404. So when you investigate a problem, look at the code the server returns, not only at the message on the page.

The most common HTTP status codes

CodeNameWhat it means
200OKThe page was returned without problems.
301Moved PermanentlyThe page has moved to a new address for good.
302FoundA temporary redirect; the original address stays the same.
304Not ModifiedThe page has not changed, so the browser can use its cached copy.
403ForbiddenThe server understood the request but refuses access.
404Not FoundThere is no resource at the requested address.
410GoneThe resource has been removed permanently.
429Too Many RequestsToo many requests were sent in a short time.
500Internal Server ErrorAn unexpected error occurred on the server.
502Bad GatewayA server in between received an invalid response from the server behind it.
503Service UnavailableThe server cannot respond for now (maintenance or overload).
504Gateway TimeoutA server in between did not get a response in time from the server behind it.

How do you check a page's HTTP status code?

  1. In the browser: Open the page, press F12 to open the developer tools and switch to the Network tab. Reload the page; the Status column of the first request shows the code.
  2. On the command line: curl -I https://yourdomain.com fetches only the response headers. The first line shows the status code, and for redirects the Location line shows the target address.
  3. Rule out the cache: If you still see an old result after a change, clear your browser cache and try again.

What should you do when you see an error code?

  • 404: Fix the page that contains the link. If the page has moved, redirect the old address to the new one with a 301; our guide to switching web hosts explains how to plan this during a move.
  • 403: Check file and folder permissions, .htaccess rules and IP blocks.
  • 500: Undo the change made just before the error (plugin, theme, .htaccess, PHP version) and look at the error logs.
  • 502, 503, 504: These usually point to overload, maintenance or an application that responds slowly. Review resource usage and slow queries; our article on why a website is slow lists possible causes.
  • If the problem continues: Open a support ticket with the time of the error, the address and the code you saw.

How do HTTP status codes affect SEO?

According to Google Search Central, a 301 is a strong signal that the target address should be used, while a 302 is a weak signal. Addresses that return 4xx (except 429) are not indexed, and indexed ones are removed over time. 5xx and 429 responses make Google slow down crawling temporarily, and addresses that keep returning server errors are eventually dropped from the index. That is why using 503 for planned maintenance, keeping maintenance short and using 301 for moved pages is the right approach.

Frequently Asked Questions

What is the difference between 301 and 302?

301 is a permanent redirect and 302 a temporary one. Use 301 when the page has really moved to its new address; 302 suits a short-term redirect.

Do 404 errors harm my site?

It is normal for deleted or never-existing addresses to return 404. The problem is when your own site links lead to a 404; fix those links or redirect them with a 301.

Which code should I use during maintenance?

503 Service Unavailable is the right code for temporary maintenance. Keep it short, because Google may eventually drop addresses that stay unavailable for a long time.

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?
(8 times viewed / 0 people found it helpful)

Powered by WISECP
Top