HTTP status codes (also called HTTP response status codes) are standardized three-digit numbers indicating whether an HTTP request succeeded or failed. Servers return these codes in the response header to tell browsers and search engines what happened to the requested resource. For marketers, these codes determine whether your pages appear in search results, preserve link equity during migrations, or disappear from Google's index entirely.
What is an HTTP Status Code?
An HTTP status code is a three-digit integer where the first digit defines the class of response. The Internet Engineering Task Force (IETF) defines these standards in Request for Comments (RFC) documents, while the Internet Assigned Numbers Authority (IANA) maintains the official registry. Codes range from 100 to 599, grouped into five classes: informational (1xx), successful (2xx), redirection (3xx), client error (4xx), and server error (5xx).
Why HTTP Status Codes Matter
- Search visibility: Only pages returning 200 OK status can be indexed by search engines. Any other code risks removal from search results.
- Link equity preservation: Permanent redirects using 301 pass link value to new URLs, maintaining your rankings during site migrations. [Links that result in a status code 301 give slightly less link equity than 200] (Umbraco).
- Content removal: Returning 410 Gone explicitly tells crawlers to remove URLs from their index immediately, critical for cleaning up hacked content.
- Server health alerts: 5xx errors indicate immediate server problems that stop all traffic, requiring hosting provider intervention.
- User conversion paths: 404 errors block users from completing purchases or viewing content, directly impacting revenue.
How HTTP Status Codes Work
When a browser or crawler requests a URL, the server processes the request and returns a status code in the HTTP response header. The code signals the result:
- Informational (1xx): The server received the request and is continuing processing. These are temporary and rarely seen by end users.
- Success (2xx): The request was received, understood, and accepted. A 200 OK means the resource was successfully delivered.
- Redirection (3xx): The resource has moved. The response includes a Location header with the new URL.
- Client Error (4xx): The request contains bad syntax or cannot be fulfilled. The client must fix the request.
- Server Error (5xx): The server failed to fulfill a valid request, indicating infrastructure problems.
Common HTTP Status Codes for SEO
| Code | Class | Meaning | SEO Impact |
|---|---|---|---|
| 200 | Success | Request succeeded | Page is crawlable and indexable |
| 301 | Redirection | Moved permanently | Passes link equity to new URL; preferred for permanent changes |
| 302 | Redirection | Found (temporary) | Does not pass full link equity; use only for temporary unavailability |
| 404 | Client Error | Not found | Removes page from index over time; loses link equity from external links |
| 410 | Client Error | Gone | Explicitly signals permanent removal; faster index removal than 404 |
| 503 | Server Error | Service unavailable | Temporary state; search engines will return later if Retry-After header is set |
Best Practices
- Use 301 for permanent changes. When migrating URLs or upgrading from HTTP to HTTPS, implement 301 Moved Permanently redirects. [Both Bing and Google recommend using this code to change the URL of a page as it is shown in search engine results] (Wikipedia). Minimize redirect chains since each 301 hop slightly reduces link equity.
- Reserve 302 for truly temporary moves. Use 302 Found only when a page will return shortly, such as for sold-out products. [If a 302 redirect remains in place too long, Google will treat it as a 301] (Umbraco).
- Deploy 410 for hacked content cleanup. After removing malicious pages, return 410 Gone rather than 404 to explicitly signal permanent deletion and ensure faster removal from search indices.
- Implement 503 during maintenance. When taking a site offline, return 503 Service Unavailable with a Retry-After header to tell search engines when to return, preventing index removal during temporary downtime.
- Monitor external links to 404s. Pages returning 404 Not Found lose link equity from external backlinks. Set up 301 redirects to relevant alternatives to preserve that value.
Common Mistakes
- Mistake: Using 302 redirects for permanent URL changes. You lose link equity because search engines treat temporary redirects differently than permanent ones. Fix: Audit all redirects and change permanent moves to 301.
- Mistake: Allowing high-traffic pages to return 404. You lose both visitors and link value from external sites. Fix: Redirect to the most relevant live page or restore the original content.
- Mistake: Returning 404 for content that should disappear forever. Search engines may retry 404 pages multiple times, delaying index cleanup. Fix: Use 410 Gone to explicitly signal permanent removal.
- Mistake: Ignoring 5xx errors as "website glitches." These indicate server crashes, overload, or DDoS attacks that stop all conversions. Fix: Immediately check server resources or contact your hosting provider.
- Mistake: Chaining multiple redirects. Each hop reduces link equity and slows page load. Fix: Update internal links to point directly to the final destination URL.
Examples
- HTTPS migration: You move your entire site from HTTP to HTTPS. Implement 301 redirects from every HTTP URL to its HTTPS counterpart. This tells search engines the move is permanent and transfers your existing rankings to the secure URLs.
- Seasonal product pages: You sell holiday merchandise that returns annually. When inventory runs out, use a 302 redirect to send traffic to your main category page. Remove the redirect when stock returns to preserve the original page's rankings.
- Post-hack cleanup: Malicious actors created thousands of spam URLs on your domain. After deleting the files, configure your server to return 410 Gone for these URLs. This signals Google to remove them from the index immediately rather than retrying them as potentially temporary 404s.
FAQ
What is the difference between 301 and 302 redirects?
A 301 Moved Permanently indicates a permanent URL change and passes link equity to the new location. A 302 Found indicates a temporary change and does not pass link equity in the same way. Use 301 for permanent site migrations and 302 for pages that will return shortly.
When should I use 410 instead of 404?
Use 410 Gone when a resource is permanently removed and will never return, such as after cleaning up hacked content or deleting outdated promotional pages. While 404 indicates "not found" (which could be temporary), 410 explicitly tells search engines to remove the URL from their index immediately.
How do I check HTTP status codes?
Open your browser's Developer Tools (F12), navigate to the Network tab, refresh the page, and click the initial document request. The status column displays the code. Alternatively, use command line tools like curl or online HTTP header checkers.
Why are 5xx errors dangerous for SEO?
5xx Server Error codes indicate your server cannot handle requests, meaning search engine crawlers cannot access your content. If persistent, search engines may drop your pages from the index entirely. These require immediate server-side investigation, not just content fixes.
What does "418 I'm a teapot" mean?
This code was defined in 1998 as an April Fools' joke in RFC 2324 (Hyper Text Coffee Pot Control Protocol). It indicates the server refuses to brew coffee because it is a teapot. While not a real error code for web applications, some sites use it as an Easter egg or, incorrectly, to block requests.
What is 402 Payment Required used for?
This code is reserved for future use in digital payment systems. While not widely standardized, some platforms use it proprietarily: [Google Developers API uses this status if a particular developer has exceeded the daily limit on requests, Shopify uses this code when the store has not paid their fees, and Stripe uses this code for failed payments where parameters were correct] (Wikipedia).