Skip to content

HTTP Status Codes for SEO

What each response code tells Google, and when to use it.

About HTTP status codes for SEO

Every time Googlebot requests a URL, the server's status code decides what happens next. A 200 sends the content on to indexing; a redirect points Google at another URL and says whether the move is permanent; a 4xx says the page doesn't exist; and a 5xx or 429 tells Google the server is struggling, so it slows down. Getting these right is the cheapest technical SEO there is, and getting them wrong, for example returning 200 for a missing page, quietly wastes crawling and confuses indexing.

This table follows Google Search Central's documentation of how it handles status codes. Google follows up to 10 redirect hops in a chain before giving up, treats 301 and 308 as strong signals that the target should be canonical and 302 and 307 as weak ones, and treats 404 and 410 almost identically. A 5xx is temporary at first, but errors that last for days will drop pages from the index, so maintenance should be short and return 503.

2xx Success

CodeNameHow Google treats itUse it for
200OKPasses the content on to indexing. Indexing isn't guaranteed.Every page you want indexed
201CreatedWaits a limited time for content, then passes whatever it got on to indexing.API responses, not pages
202AcceptedSame as 201: waits a limited time, then passes the content on.API responses, not pages
204No ContentNothing to index. Search Console may report the URL as a soft 404.Never for a page you want indexed

3xx Redirection

Google follows up to 10 hops; point redirects straight at the final URL.

CodeNameHow Google treats itUse it for
301Moved PermanentlyFollows it, and treats it as a strong signal that the target should be canonical.Permanent moves: new URL, HTTPS, domain change
302FoundFollows it, and treats it as a weak signal that the target should be canonical.Temporary moves where the old URL comes back
303See OtherFollows it like a 302.After a form submission
304Not ModifiedThe content is the same as at the last crawl. Signals may be recalculated; no other effect.Conditional requests (If-Modified-Since, ETag)
307Temporary RedirectFollows it like a 302: a weak canonical signal.Temporary moves that must keep the request method
308Permanent RedirectTreated the same as a 301.Permanent moves that must keep the request method

4xx Client errors

CodeNameHow Google treats itUse it for
400Bad RequestThe content is ignored and the URL is treated as not existing. Indexed URLs are removed.Malformed requests
401UnauthorizedTreated like a 404: not indexed. Not a way to slow down crawling.Pages that need a login
403ForbiddenTreated like a 404: not indexed. Not a way to slow down crawling.Pages nobody may see
404Not FoundNot indexed; indexed URLs drop out and crawling of them slows over time. Doesn't hurt the rest of the site.Pages that never existed or are gone
410GoneTreated the same as a 404.Pages removed on purpose
411Length RequiredTreated like other 4xx errors: not indexed.Requests missing Content-Length
429Too Many RequestsTreated as a server error: Google slows its crawling down. Not a 'doesn't exist' signal.Rate limiting

5xx Server errors

CodeNameHow Google treats itUse it for
500Internal Server ErrorCrawling slows down. Indexed URLs are kept for a while, then dropped if the errors continue.Unexpected failures
502Bad GatewaySame as 500: crawling slows down, and long-lasting errors remove URLs.A proxy or CDN couldn't reach the origin
503Service UnavailableSame as 500. The usual choice for planned downtime, ideally with a Retry-After header.Maintenance windows of hours, not days

When robots.txt itself returns an error

The status code of /robots.txt changes how Google crawls the whole site.

robots.txt statusWhat Google does
2xxGoogle follows the rules in the file.
3xxGoogle follows at least five redirect hops, then stops and treats robots.txt as a 404.
4xx (except 429)Treated as if there were no robots.txt: everything may be crawled.
429 and 5xxGoogle stops crawling the site for the first 12 hours while it retries, then uses the last good copy for up to 30 days. After that it depends on whether the rest of the site is reachable.

Good to know

Soft 404s

A page that says 'not found' or is nearly empty but returns 200 is a soft 404. Search Console reports them. Return a real 404 or 410 for missing pages, or redirect to a closely related page if one exists; redirecting everything to the home page is treated as a soft 404 too.

Don't use 4xx to slow crawling

Returning 403 or 404 to Googlebot to reduce load removes pages from the index. If crawling is too heavy, return 429 or 503 briefly, which Google reads as a request to slow down.

More references