Check 05.01 · HTTP and redirects

Check that active pages return 200

List the pages that must be live, check that they all return 200 with no redirect or error, then fix the gaps according to your server or CMS.

Priority
Critical
Difficulty
Easy
Estimated time
1 to 3 h
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

An active page is a page you want crawled, indexed and cited: it must return 200 OK directly, with no redirect, no error and no block page. This check consists of listing those pages, testing their response code as a browser and a crawler see it, then fixing every gap. Once it is done, the sitemap, the menu and the internal links point only to URLs that return 200.

Why it matters

The response code is the first thing a crawler reads. Google documents how it handles each family of codes: a 2xx response passes the content on to the next stage, a 3xx points to another URL, a 4xx (except 429) signals non-existent content that Google removes from the index over time, and a 5xx or a 429 slows crawling down and, if it persists, makes the URLs drop out of the index.

Three situations make you lose an active page without anyone noticing:

  • Intermittent error: the page returns 200 in your browser, but 500 or 503 when the server is under load, often just when the crawler comes by.
  • Different response depending on the client: a web application firewall (WAF) or an anti-bot protection returns 403 or a challenge page to Google's, Bing's or generative engines' crawlers.
  • Unwanted redirect: the page redirects to the trailing-slash version, to a login page or to the homepage. It is no longer indexed under its own address.

Conversely, a 200 guarantees nothing: an empty page, or one that says “product not found” with a 200 code, is treated as a soft 404. See fix soft 404s (opens in a new tab).

What it improves

  • Indexing Only URLs that return 200 can be indexed under their own address.
  • Crawling Fewer requests wasted on errors and redirects, a noticeable effect on large sites.
  • Generative engines AI assistants' search crawlers can only cite a page they managed to retrieve. A page that returns 403 to them is invisible, even if it ranks well on Google.
  • Visitor experience Fewer error pages reached from the menu, the search results or an assistant's answer.
  • Rankings A 200 has no direct effect in itself; it is the precondition for everything else.

How to check

Test a page without following redirects:

curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" https://www.example.com/services/

Compliant result: 200 followed by nothing. A 301 https://www.example.com/services means the URL tested is not the canonical URL: fix the links that point to it.

Then test with a crawler user agent, because some protections filter on that criterion:

curl -s -o /dev/null -w "%{http_code}\n" -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" https://www.example.com/services/

A firewall that checks crawlers' IP addresses may block this fake Googlebot while letting the real one through. To find out the response Google actually receives, use the Search Console URL Inspection tool: click “Test live URL”, then “View tested page” and the “More info” tab, which shows the HTTP response. Bing Webmaster Tools offers the same test in URL Inspection.

For an overview, open the Page indexing report: the reasons “Not found (404)”, “Server error (5xx)”, “Blocked due to access forbidden (403)”, “Page with redirect” and “Soft 404” list the URLs known to Google that do not return 200.

How to implement

Step 1 — List the active pages

Gather into a single list the URLs that must return 200:

  1. XML sitemaps: the simplest source, since they should contain only canonical URLs that return 200.
  2. Traffic pages: an export of organic landing pages from Search Console (Performance report, Pages tab) and of page views from Google Analytics or Matomo over twelve months.
  3. Strategic pages: commercial pages, contact pages, pages cited by AI assistants, pages that receive backlinks.
  4. Crawl: every URL found by following internal links, with Screaming Frog (free up to 500 URLs) or an equivalent.

Extracting the URLs from a simple sitemap:

curl -s https://www.example.com/sitemap.xml | grep -o "<loc>[^<]*</loc>" | sed -e "s/<loc>//" -e "s/<\/loc>//" > urls.txt

If the file is a sitemap index, it contains other sitemaps: run the command again on each of them.

Step 2 — Test the codes in bulk

With curl, on the list you obtained, eight requests at a time:

xargs -P 8 -I {} curl -s -o /dev/null --max-time 20 -w "%{http_code};%{redirect_url};{}\n" {} < urls.txt > codes.csv
grep -v "^200;" codes.csv

The second command displays only the gaps. Use a GET request as above rather than curl -I: some servers respond differently to HEAD requests. Run the test again at a peak-load time to catch intermittent errors.

With Screaming Frog, switch to Mode > List, paste the list, then filter the Response Codes tab on Redirection (3xx), Client Error (4xx), Server Error (5xx) and No Response. In standard crawl mode, the same tab shows the internal links that lead to pages in error.

Bing Webmaster Tools offers a free audit, Site Scan, which crawls the site and ranks technical issues by severity, with a CSV export.

Step 3 — Classify the gaps and decide

Code received Likely diagnosis Action
301, 308 The listed URL is not the canonical one (slash, www, uppercase) Update the sitemap and the links to the final URL
302, 307 Unwanted temporary redirect, often to a login page Remove the redirect or fix its type
401, 403 Page protected by mistake, WAF, anti-bot protection Lift the block on public pages
404, 410 Page deleted or wrong URL in the list Republish, redirect to the equivalent, or remove the URL from the lists
429 Rate limit too strict Adjust the limit for legitimate crawlers
500, 502, 503, 504 Application error, overloaded server, timeout Read the error logs and fix the cause
200 with error content Soft 404 Return the real code or restore the content

For redirects, see use 301/308 for permanent moves (opens in a new tab). For blocks, see fix unjustified 403s (opens in a new tab), and for server errors, fix 5xx errors (opens in a new tab).

Tip: keep the codes.csv file with a date. Running it again every week, or after every release, is enough to detect a regression before it shows up in Search Console.

Apache

Versions Apache 2.4.

Gaps most often come from the .htaccess file. Open it and look for the Redirect, RedirectMatch and RewriteRule [R] rules that target the faulty URLs, as well as the Require or Deny blocks that protect a public folder by mistake. The error log (/var/log/apache2/error.log on Debian and Ubuntu, /var/log/httpd/error_log on Red Hat) explains 403s and 500s:

sudo tail -n 100 /var/log/apache2/error.log

A 404 on every page except the homepage usually means mod_rewrite is inactive or the .htaccess file is ignored: enable the module (sudo a2enmod rewrite) and check AllowOverride All in the virtual host.

Nginx

Versions Nginx 1.24 and later.

Check that the application's routes go through try_files to the front controller, otherwise they return 404:

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

Conversely, a single-page application whose URLs all fall back to index.html returns 200 even for a page that does not exist: it is up to the application to return a real 404. See check SPA HTTP status codes (opens in a new tab). Check /var/log/nginx/error.log for 403s, 502s and 504s.

Cloudflare

Versions Cloudflare dashboard, all plans, November 2026.

Open Security Analytics and filter on blocked or challenged requests: verified search crawlers should not appear there. “Under Attack” mode or an overly broad rule returns a challenge page to crawlers. Responses served by Cloudflare carry a cf-ray header: compare with a direct test on the origin to know who is responding. See check CDN, WAF and anti-bot protection (opens in a new tab).

Plesk

Versions Plesk Obsidian 18.0.

In Websites & Domains > your domain > Logs, filter the access logs on 4xx and 5xx codes. Also check Hosting & DNS > Hosting (the hosting settings screen): the redirect to the preferred domain and the HTTPS redirect must lead to the canonical URL in a single step. A password-protected folder (“Password-Protected Directories”) returns 401 to everyone.

cPanel

Versions cPanel & WHM 110 and later, Jupiter theme.

In Metrics > Errors, cPanel displays the latest server errors for your account. The Domains > Redirects screen lists the redirects created from the panel: delete those that target active pages. Security > Directory Privacy shows the protected folders.

Shared hosting

Without live access to the error logs, use the downloadable logs in the customer area and the curl test. A spike of 500s or 508s on shared hosting often signals that the allocated resources have been exceeded: compare the time of the errors with the panel's resource usage graphs.

WordPress

Versions WordPress 6.6 and later (block editor).

  • 404 on every page except the homepage: open Settings > Permalinks and click “Save Changes” without changing anything, which regenerates the rewrite rules.
  • Pages returning 503: a maintenance plugin was left active, or a .maintenance file remains at the root after an interrupted update. Delete it.
  • Pages returning 403: a security plugin blocks crawlers or countries. Check its log.
  • Pages returning 404 or showing a password form: the page is private (404 for logged-out visitors) or password-protected. Check the “Status” field in the Page or Post tab of the editor sidebar.
  • Pages returning 302 to the login page: a membership, access restriction or private site plugin protects the page. Adjust its rules.

Shopify

Versions Shopify admin, all plans, November 2026.

Shopify returns 200 for published pages. A product page returning 404 is usually not available on the Online Store sales channel, or has been archived. As long as private mode is on (Online Store > Preferences, store access section), logged-out visitors, crawlers included, receive the password page.

Laravel

Versions Laravel 10 to 13.

Route model binding (Route::get('/produits/{product:slug}', …)) returns 404 as soon as the slug no longer matches. An auth middleware applied to an overly broad group redirects public pages to /login with a 302. List the routes and their middleware:

php artisan route:list -v --except-vendor

500 errors are detailed in storage/logs/laravel.log.

Next.js

Versions Next.js 15 and 16 (App Router and Pages Router).

Test the production build (next build && next start) and not the development server, whose codes may differ.

App Router

A page that calls notFound() returns 404 if the call happens before streaming starts, but 200 with a noindex tag if it happens afterwards. Run existence checks at the start of rendering, outside components wrapped in Suspense.

Pages Router

Return { notFound: true } from getServerSideProps or getStaticProps when the content does not exist: the page then returns 404. A page that displays an error message without this return value returns 200 and becomes a soft 404.

Common mistakes

  • Testing with curl -L or in the browser: redirects are followed and you see a final 200 where the crawler receives a 301.
  • Testing only from your own computer: a WAF or a geographic rule may treat crawlers and foreign visitors differently.
  • Leaving URLs that redirect in the sitemap: Google reports them and ends up trusting the file less. See exclude redirects, errors and noindex pages (opens in a new tab).
  • Considering a 200 to be enough: an empty results page or an error message returned with 200 is still a soft 404.
  • Forgetting the variants: mobile versions, paginated pages, language versions and AMP pages each have their own code.
  • Running a one-off audit: a plugin update or a firewall rule can break hundreds of URLs overnight.

Frequently asked questions

Does a page that redirects with a 301 count as an active page?

No. A URL that returns 301 is not indexed under its own address: the redirect's destination is. Active pages must return 200 directly. If your sitemap or your internal links point to URLs that return 301, replace them with the final URL, often the same address with or without a trailing slash, or with the right host name.

Why does my page return 200 in the browser but an error in Search Console?

The browser and Googlebot do not always receive the same response. The usual causes are a firewall or an anti-bot protection that filters crawlers, an intermittent error when the server is under load, or a redirect that the browser follows without showing it. Run a live test in the URL Inspection tool and compare with the server logs at the time of the crawl.

Should I check HTTP codes for AI assistant crawlers?

Yes. The search crawlers of ChatGPT, Perplexity or Claude can only cite a page they have retrieved. A WAF or an anti-bot protection often returns a 403 or a challenge page to them, while Googlebot gets through. Test your key pages with their user agents, then confirm in the server logs, because only their official IP addresses prove that the requests really come from them.

How often should I check the response codes of active pages?

After every release, migration or firewall rule change, then at least once a month on the full list. Sites that publish or modify many pages benefit from automating the check every week, with a scheduled crawl or a script that compares the codes received with the reference file and sends an alert when something differs.

Updated on

Topic checklist (PDF)

And now?

In the “HTTP and redirects” topic

  1. Check that active pages return 200
  2. Use 301/308 for permanent moves
  3. Use 302/307 for temporary moves
  4. Fix redirect chains
  5. Fix redirect loops
  6. Fix broken internal links
  7. Fix broken external links
  8. Create a helpful 404 page
  9. Return 404/410 for removed content with no equivalent
  10. Avoid redirecting all removed pages to the homepage
  11. Fix unjustified 403s
  12. Fix excessive 429s
  13. Fix 5xx errors
  14. Monitor server errors
  15. Use 503 during temporary maintenance