webzod
account

Remove the noindex header from the homepage on Caddy

seo.indexability.noindex_header · effort: minutes

Why it matters

An X-Robots-Tag header with noindex tells search engines to keep the homepage out of their results, even though the page itself looks fine. It is often a leftover from a staging server or a security rule.

Staged change. Do this in stages and check each one before the next, so a mistake does not break your site or your mail.

The fix

  1. Check that it is not deliberate, then remove the header line in the Caddyfile that sets X-Robots-Tag (search the file for it) and any header set by the application behind Caddy.
  2. If the header comes from an application behind reverse_proxy, either fix it in the application or strip it from the proxied response with header_down, as in the snippet.
  3. Run caddy reload and run curl -sI on the homepage to check the header is gone.
Caddyfile
reverse_proxy localhost:8080 {
	header_down -X-Robots-Tag
}

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.