HTTP Status Codes

27/03/2022
HTTP Status Codes

HTTP status codes are the status of responses by servers to clients sending requests, such as web browsers or crawlers. Every response code has a different meaning, but generally outcome of the request is the same. For instance, there are multiple redirect codes, but their outcome is the same.

Search engine webmaster tools like Google Search Console show 4xx and 5xx errors as well as 3xx redirections.

2xx Status (Success)

Search engines consider successfully opened pages for indexing. But a 2xx HTTP status code does not guarantee indexing by search engines.

200 (Success)

The 200 response code shows that there are no errors and the page is opened successfully. Search engine bots can index pages with 200 response codes in their own indexes, but this is not guaranteed.

201 (Created)

202 (Accepted)

204 (No Content)

The 204 (No Content) HTTP response status code indicates that the request has been successfully processed, but there is no content to return. It is used when the server has fulfilled the request but does not need to send any content back to the client.

This status code is typically used after operations that update data on the client side (such as PUT, PATCH, or DELETE) when there is no need for the server to return additional information.

  • The response contains no body.
  • It is used to indicate the success of an operation without returning any content.
  • It generally implies that the client does not need to refresh or redirect the user interface.

3xx Status (Redirection)

301 (Moved Permanently)

Redirect Path

When the address to be reached is permanently moved to another address, 301 forwarding takes place. Web browsers redirect the page, and search engines update the previously indexed page with the redirected page.

If a page on the website that has been deleted and dropped to 404 is redirected to another 301-related page, redirecting the user to another relevant page instead of the 404 page may reduce the likelihood of the user leaving the page.

You can use the Redirection plugin to make 301 redirects in WordPress infrastructure.

302 (Found)

A 302 status code indicates a temporary redirect. The 302 code indicates that the content is present but in a different location. A temporary 302 redirect can be used if the content will be shown to the user on an alternative page and the current URL will be reused in the future.

Since the 302 redirect is a temporary redirect, the search engine bots ignore it for a while, but if this redirect remains for a long time, they can treat this redirect as a 301 and update the pages.

303 (See Other)

304 (Not Modified)

307 (Temporary Redirect)

Same as 302 status code.

A 307 is a temporary redirect, just like a 302. While the 302 redirect is unclear, 307 indicates that the page has been temporarily moved to another location, exactly as requested.

If you are sure that the redirect is temporary, use 307.

Note: Google bots do not see 307 redirections.

302 vs 307 Redirection

308 (Moved Permanently)

Same as 301 status code.

Note: Status codes 307 and 308 are rarely encountered. The status codes usually seen on websites are 301 and 302.

Redirect Chain

If web browsers or search engine bots follow multiple redirects (for example, 1. Page > 2. Page > 3. Page), it’s a redirect chain. Google advises redirecting to the final destination. If it’s not possible, keep the redirect chain low, like a maximum of 3 times and fewer than 5.

The redirect chain delays the loading of pages, and not all web browsers support a long redirect chain.


4xx Status (Client Errors)

403 (Forbidden)

The 403 (Forbidden) HTTP response status code indicates that the server understood the request made by the client, but it is refusing to fulfill it due to a lack of proper authorization. It typically results from insufficient permissions; for example, the user may be logged in but does not have the necessary access rights.

Even if authentication has been performed, the user is not authorized to access the requested resource.

  • A regular user tries to access a page that is only available to administrators.
  • An API key is valid, but the operation being attempted is not permitted with that key.

404 (Not Found)

If the server cannot find the requested page, it shows a 404 status code. 404 pages are also known as dead links or broken links.

410 (Gone)

The 410 (Gone) HTTP response status code indicates that the requested resource has been permanently deleted from the server and is no longer accessible.

A 410 is different from a 404 Not Found because the server is explicitly stating that the resource has been intentionally and permanently removed.

  • An old blog post, product, or page has been permanently deleted,
  • Content has been removed due to copyright violations or legal reasons,
  • API endpoints have been permanently deactivated.

429 (Too Many Requests)


5xx Status (Server Errors)

500 (Internal Server Error)

502 (Bad Gateway)

503 (Service Unavailable)


Redirect Path Extension

With the Redirect Path extension on a web browser, it’s easy to see the response code of the content.

Redirect Path

Reference:

https://developers.google.com/maps-booking/verticals/dining/reference/rest-api-v3/status_codes
https://developers.google.com/search/docs/advanced/crawling/http-network-errors
https://developers.google.com/search/docs/advanced/crawling/site-move-with-url-changes
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
https://yoast.com/which-redirect/