Quick Answer: HTTP status codes tell a crawler whether a page exists, moved or is gone, so they decide whether your content can be retrieved at all. Return 200 for live pages, a single 301 for permanent moves, 410 or 404 for removed pages, and avoid soft 404s and long redirect chains.

You can write the clearest, most citable answer on the web and still never appear in an AI response, because the crawler never received it. An HTTP status code is the first thing a crawler reads, and a wrong one quietly removes a page from consideration. This guide covers which codes to return, where redirects go wrong and how to check your own site.

What is an HTTP status code and why does it matter for AI crawlers?

An HTTP status code is a three-digit number your server returns with every response to say whether a request succeeded, moved or failed. AI crawlers and retrieval systems use it to decide whether to read the body, follow somewhere else or drop the URL.

The codes are defined in the HTTP semantics specification, RFC 9110. Crawlers vary in how patient they are, but all of them start from the same signal. If the code says the page is not there, the content is not considered, however good it is.

This matters more for answer engines than for classic search, because a retrieval system that fetches pages live has a short window to get usable text. A slow or confusing response is easier to skip than to retry. For the wider picture of how crawlers fetch pages, see how AI crawlers actually index your site.

Which status codes should your pages return?

Live pages should return 200, permanent moves should return 301 or 308, and removed pages should return 410 or 404. Anything else needs a specific reason.

SituationCorrect codeWhat a crawler does with it
Page exists and is readable200Reads the body and may use it
Page moved permanently301 or 308Follows to the new URL and treats it as the replacement
Page moved temporarily302 or 307Follows, but may keep the old URL as the reference
Page deleted on purpose410Treats it as intentionally gone
Page never existed or unknown404Treats it as missing and may retry later
Server fault500 or 503Treats it as a temporary failure and may back off
Access refused401, 403 or 429Treats it as blocked or throttled

The pattern to remember is that the code should describe the truth. A 200 on a page that says "not found" is a lie to the crawler, and it is the root of most problems below.

How do redirect chains and loops hurt AI visibility?

A redirect chain forces a crawler to make several requests before it reaches any content, and every extra hop is another chance for it to give up. A loop guarantees failure because the crawler never reaches a final page.

Chains tend to build up through ordinary site maintenance. A URL is redirected during a redesign, then again when the platform changes, then again when HTTP becomes HTTPS and a trailing slash rule is added. Each change was reasonable on its own. Together they produce a path of four or five hops that nobody ever tested end to end.

The fix is simple in principle: every old URL should redirect once, directly to the current final URL. When you add a new redirect, update the older ones that pointed at the URL you just moved, rather than stacking another hop on top.

  1. List every redirect rule you have, including those in the CMS, the web server and the CDN.
  2. For each source URL, request it and record the final destination and the number of hops.
  3. Rewrite any rule that takes more than one hop so it points straight at the final URL.
  4. Remove rules whose source URL is no longer linked or indexed anywhere.
  5. Re-test after every platform change, not just after launches.

When should you use 301, 302, 307 or 308?

Use 301 or 308 when a move is permanent and 302 or 307 only when the old URL will genuinely come back. The permanent codes tell a crawler to replace the old address in its records, and the temporary ones tell it to keep the old one.

A common mistake is leaving a temporary 302 in place for years after a migration. The content has long since moved, but the signal still says it might return. That ambiguity can leave the old URL as the reference that engines and other sites keep using.

The difference between 301 and 308, and between 302 and 307, is about request methods. For ordinary page requests the practical behaviour is the same, so choose whichever your platform supports cleanly and stay consistent. Mixed conventions across a site make auditing harder.

What is a soft 404 and how do you find one?

A soft 404 is a page that tells the visitor the content is missing but returns a 200 status code. Crawlers that see a 200 treat the page as real content, so thin error pages get fetched, processed and sometimes associated with your brand.

Soft 404s come from a few predictable places:

  • A custom error page that was built as a normal template and never set to send 404.
  • Internal search result pages with no results.
  • Out-of-stock or discontinued product pages that keep a 200 but show almost no content.
  • Redirects that send every missing URL to the home page, which many crawlers treat as a soft 404.

To find them, request a URL you know does not exist, such as a random string under your domain, and read the status code in the response headers rather than the page. Then sample your templates for empty states. If a page has no useful answer on it, the status code should say so.

How do 403, 429 and 5xx errors block AI agents?

A 403 or 429 tells a crawler it is not allowed or is going too fast, and a 5xx tells it your server failed. In each case the crawler leaves without your content, and you may never see an error because real visitors are unaffected.

This is the status-code side of the problem described in how CDN bot management rules silently block AI crawlers. A firewall rule that challenges unfamiliar user agents will return a 403 or a challenge page to a crawler while your own browser sees a normal site. Your server logs, covered in AI crawler log analysis, are the reliable place to confirm what each crawler actually received.

For planned downtime, return 503 rather than 200 or 404. A 503 signals that the outage is temporary, which is the accurate message, and a crawler can reasonably try again later.

How do status codes interact with robots.txt and canonical tags?

Status codes, robots.txt and canonical tags are three separate signals, and they must agree. A page blocked in robots.txt cannot be read, so a canonical tag or noindex on it will never be seen.

Consider a page that redirects to a new URL while the new URL carries a canonical tag pointing back at the old one. The crawler receives contradictory instructions and has to guess. The same happens when a robots.txt rule blocks a path that your redirects depend on. Our guides on canonical tags and duplicate content and on how robots.txt, llms.txt and AGENTS.md work together cover those two layers in more detail.

A simple rule of thumb: decide the one correct URL for each piece of content, then make the status code, the canonical tag, the sitemap entry and your internal links all name that same URL.

How do you audit status codes across your site?

Crawl your own site with a tool that records the status code and redirect path for every URL, then compare that list with your sitemap and your server logs. The gaps between those three sources are where most problems live.

A practical first pass looks like this:

  1. Export every URL from your sitemap and confirm each returns 200 directly, with no redirect.
  2. Crawl internal links and flag any that point to a redirecting, 404 or 5xx URL.
  3. Check your five most important templates for correct 404 behaviour on empty states.
  4. Request a nonexistent URL and confirm a true 404 or 410.
  5. Review server logs for AI user agents and look at which status codes they actually received.

Doing this by hand is workable for a small site. On a large site with several redirect layers, it often becomes a recurring technical project, and a specialist can set it up and document it for you. You can browse AEO agencies in the directory or look at AEO tools that help with crawling. The directory is free for buyers and does not guarantee any outcome from the work.

The bottom line

Status codes are the cheapest part of technical AEO to fix and the easiest to overlook, because nothing looks broken to a human visitor. Make each code tell the truth, keep redirects to a single hop, and make sure your signals agree on one URL per page. If you would rather have help with a technical audit, get matched with an AEO specialist by describing your site and what you need.