Home›SEO QA›HTTP Header SEO Testing

SEO QA · Response headers

HTTP Header SEO Testing

Some of the strongest SEO signals never appear in the page source. Test the response headers, and test them at every layer that can change them.

9 headers tested4 layers that set them0 visible in the browser

SEO QA · Verification process

HTTP header SEO testing checks the response headers search engines read before they look at any HTML. A noindex in the X-Robots-Tag header, a canonical in a Link header, or a 503 without Retry-After all change how a page is treated, yet none of them are visible when you view the page in a browser.

Definition

Header testing requests URLs, records the full response headers, and compares them with expected values per template. Because headers can be added or rewritten by the application, the web server, the CDN and the firewall, a header test is also a test of which layer is responsible.

Headers that affect SEO

HeaderWhat it controlsExpected on indexable URLsCommon defect
Status lineWhether the URL is live, moved or gone200Soft errors, wrong 3xx type
X-Robots-TagIndexing and snippet directivesAbsent, or no noindex/nonenoindex added by CDN or middleware
Link: rel=canonicalCanonical, often on PDFs and filesMatches HTML canonical or absentConflicts with HTML canonical
Link: rel=alternate hreflangLanguage alternates for non-HTML filesMatches the hreflang setStale alternates after URL changes
LocationRedirect targetFinal URL, absolutePoints to another redirect
Content-TypeHow the body is parsedtext/html; charset=utf-8Wrong type or charset
Retry-AfterSignals temporary unavailability with 503Present during maintenance503 without it, or 200 maintenance pages
Strict-Transport-SecurityForces HTTPSPresentMissing, see HSTS missing
VaryWhich request headers change the responseAccurate for user agent or languageMissing when content differs by user agent

Which layer set the header?

LayerTypical changeHow to isolate it
ApplicationMiddleware adds headers per routeRequest the origin directly, bypassing the CDN
Web serverConfig rules per directory or file typeCompare server config between environments
CDN / edgeHeader rules, cached responsesCompare a cache hit with a cache miss
WAF / bot protectionChallenge pages or blocks for crawlersCompare a crawler user agent with a browser user agent

The last row is the most common surprise: the page works for people and fails for crawlers. Compare responses for both user agents on the same URL. Blocks aimed at AI crawlers are covered in fixing 403 errors for AI crawlers.

Header and HTML conflicts

ConflictEffectFix
HTML index, header noindexHeader wins, page excludedRemove the header rule
HTML canonical A, Link header canonical BConflicting signals, both may be ignoredKeep one source
200 status on a maintenance pageMaintenance text may get indexedReturn 503 with Retry-After
Redirect via meta refresh while header is 200Weaker, slower redirectUse a 301 or 308 header

When to test

  • CDN, cache or firewall rule changes
  • Server or hosting configuration changes
  • New middleware or framework upgrades
  • Planned maintenance windows
  • Changes to how PDFs and downloadable files are served

Before and after example

Before deployment/docs/api/
HTTP 200
X-Robots-Tag: (none)
→
After deployment/docs/api/
HTTP 200
X-Robots-Tag: noindex
Verdict: regression. A new CDN rule meant for /docs/internal/ matches all of /docs/.

The page looked unchanged in every browser. Only the header comparison exposed it, which is why post-deployment testing should always include headers.

Acceptance criterion

SEO requirement: No indexable URL returns an X-Robots-Tag value that blocks indexing.
QA test: Crawl all templates, record response headers with a crawler user agent.
Expected: No noindex or none in X-Robots-Tag on URLs listed in the sitemap.
Failure: Any blocking value on an indexable URL.
Verification: Repeat after every CDN, server or firewall change.