HTTP Status Codes for SEO
Why Do HTTP Status Codes Matter for SEO?
HTTP status codes SEO is about how search engines read the three-digit code that every server returns. An HTTP status code is that number, and it tells the browser or crawler what happened to the request: the page was found, it has moved, it is missing or the server failed. Search engines act on these codes when they decide whether to keep, update or drop a URL in their index.
HTTP stands for Hypertext Transfer Protocol, the set of rules that browsers and servers use to exchange pages. Crawlers, the programs search engines use to fetch pages, read the same codes that browsers do.
The Five Code Classes and How Search Engines React
The first digit of the code defines its class.
- 2xx (success): 200 OK means the page is available and can be indexed, unless another instruction says otherwise.
- 3xx (redirection): the page has moved and the crawler should request another address. A permanent redirect tells search engines to transfer signals to the new address over time. See 301 vs 302 redirects.
- 4xx (client error): the request cannot be fulfilled, most often because the page does not exist. A 404 or 410 leads search engines to drop the URL over time. Compare 404 and 410.
- 5xx (server error): the server failed to answer properly. Brief failures are tolerated, but repeated errors slow crawling and can remove pages from results.
Codes in the 1xx range are informational and rarely matter for SEO.
Server Errors and Planned Downtime Are Not the Same
Consider a shop whose server returns 500 errors for two days during a traffic spike. Crawlers notice the failures and slow their visits to protect the server. Existing pages stay in the index for a while, but new products are discovered slowly.
For planned maintenance, a 503 Service Unavailable response with a Retry-After header is the better choice. It tells search engines the outage is temporary and suggests when to come back. A 500 suggests something is broken, while a 503 says the site will return. For the effect of outages on rankings, see downtime and rankings.
Frequently asked questions
Which status code should a working page return?
A 200 OK status. It tells search engines that the page is available and can be indexed. A page that returns 200 but shows an error message is a different problem, known as a soft 404.
Do 404 errors hurt my rankings?
Not directly. A few 404 errors from removed pages are normal. Problems arise when internal links or valuable external links point to missing pages, because visitors and crawlers reach dead ends. Redirect valuable old addresses to the most relevant current page.