Skip to content
  • There are no suggestions because the search field is empty.

Why is a 404 page is cached as 200?

Understand why this happens and how to fix it.

Overview

A 404 or non-existent page being cached as a 200 is a soft404 page and can mislead search engines into believing the content exists, which can harm your site's SEO. This issue typically arises from misconfigurations in server headers, causing the Prerender.io service to incorrectly cache 404 pages as successful responses.

How to check if a page is soft404

  1. Open a URL that you expect to return a 404 (non-existent page).

  2. Open Chrome Developer Tools:
    a. Windows: Press Ctrl + Shift + J
    b. Mac: Press Option + ⌘ + J

  3. Click on the Network tab.

  4. Refresh the page if needed, then check the Status column for the main HTML request. It should show 404.

  5. To test how Googlebot sees the page:
    a. Right-click on the page and choose Inspect.
    b. Go to the Network tab.
    c. Click the three-dot menu (⋮) > More tools > Network conditions.
    d. Uncheck "Use browser default" and select Googlebot as the User-Agent.
    e. Refresh the page and check the status again.

If the page is 404 yet the status code is 200, it is a soft404 page.

    image-1702396002201

    Cause and Solutions

    Incorrect Server Response Codes

    Your server might be returning a 200 status code for 404 pages instead of the appropriate 404 status.

    • Solution 1: Ensure your server sends a 404 status code for non-existent pages. Test this with cURL or Chrome browser developer tools.

      image-1697464946199

    • Solution 2: Implement the 404 Prerender Status Code. If your REST endpoint returns a 200 but the content indicates a missing page, you can signal a 404 to crawlers by adding the following meta tag. You can find more detailed instructions here: Best practices

      <meta name="prerender-status-code" content="404">

    Tips and Best Practices

    • Keep your URLs in check.
    • Use our 404 Checker tool to identify if your server responds with the appropriate 404 http status code. 

    Related articles: