layout | title | authors | date | description | codelabs | ||
---|---|---|---|---|---|---|---|
post |
Fix unsuccessful HTTP status codes |
|
2018-11-05 |
HTTP status codes indicate the response given by a server for a request to a
URL. 4XX status codes signal to search engines that a page does not provide
any content.
|
|
HTTP status codes indicate the response given by a server for a request to a
URL. 4XX
status codes signal to search engines that a page does not provide
any content. For example, 404
indicates the page not found; 403
indicates
the content is restricted. In both cases, search engines assume there's nothing
to show in search results, and may not index the page.
Lighthouse displays the following failed audit if search engines have trouble indexing your page: Page has unsuccessful HTTP status code.
Some HTTP status codes tell crawlers that a page isn't available. That means search engines won't index the page and therefore won't include it in search results. This makes sense for any URLs that show errors, or which don't exist on your website.
To fix the error, refer to the documentation for your specific server or hosting
provider to make sure that your server returns a 2XX
HTTP status code for all
valid URLs, or a 3XX
status code if the page has moved to another URL.
{% Aside 'codelab' %} Learn how to fix 404's in an express.js application. {% endAside %}
Run the Lighthouse SEO Audit (Lighthouse > Options > SEO) and look for the results of the audit Page has unsuccessful HTTP status code.