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
| Code | Name | How Google treats it | Use it for |
|---|---|---|---|
| 200 | OK | Passes the content on to indexing. Indexing isn't guaranteed. | Every page you want indexed |
| 201 | Created | Waits a limited time for content, then passes whatever it got on to indexing. | API responses, not pages |
| 202 | Accepted | Same as 201: waits a limited time, then passes the content on. | API responses, not pages |
| 204 | No Content | Nothing 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.
| Code | Name | How Google treats it | Use it for |
|---|---|---|---|
| 301 | Moved Permanently | Follows it, and treats it as a strong signal that the target should be canonical. | Permanent moves: new URL, HTTPS, domain change |
| 302 | Found | Follows it, and treats it as a weak signal that the target should be canonical. | Temporary moves where the old URL comes back |
| 303 | See Other | Follows it like a 302. | After a form submission |
| 304 | Not Modified | The content is the same as at the last crawl. Signals may be recalculated; no other effect. | Conditional requests (If-Modified-Since, ETag) |
| 307 | Temporary Redirect | Follows it like a 302: a weak canonical signal. | Temporary moves that must keep the request method |
| 308 | Permanent Redirect | Treated the same as a 301. | Permanent moves that must keep the request method |
4xx Client errors
| Code | Name | How Google treats it | Use it for |
|---|---|---|---|
| 400 | Bad Request | The content is ignored and the URL is treated as not existing. Indexed URLs are removed. | Malformed requests |
| 401 | Unauthorized | Treated like a 404: not indexed. Not a way to slow down crawling. | Pages that need a login |
| 403 | Forbidden | Treated like a 404: not indexed. Not a way to slow down crawling. | Pages nobody may see |
| 404 | Not Found | Not 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 |
| 410 | Gone | Treated the same as a 404. | Pages removed on purpose |
| 411 | Length Required | Treated like other 4xx errors: not indexed. | Requests missing Content-Length |
| 429 | Too Many Requests | Treated as a server error: Google slows its crawling down. Not a 'doesn't exist' signal. | Rate limiting |
5xx Server errors
| Code | Name | How Google treats it | Use it for |
|---|---|---|---|
| 500 | Internal Server Error | Crawling slows down. Indexed URLs are kept for a while, then dropped if the errors continue. | Unexpected failures |
| 502 | Bad Gateway | Same as 500: crawling slows down, and long-lasting errors remove URLs. | A proxy or CDN couldn't reach the origin |
| 503 | Service Unavailable | Same 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 status | What Google does |
|---|---|
| 2xx | Google follows the rules in the file. |
| 3xx | Google 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 5xx | Google 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
- Meta tags cheat sheetWhich meta tags Google uses and which it ignores
- Robots meta directivesnoindex, nosnippet, max-snippet and X-Robots-Tag
- Schema types for rich resultsGoogle's rich result types and their required properties
- AI crawler user agentsGPTBot, ClaudeBot, Google-Extended and other AI bots
- Hreflang codesLanguage and region codes for hreflang, and common mistakes
- SEO glossary71 SEO terms explained in plain English