Prompt
How do I validate canonicals, robots.txt, and noindex across a site?
Latest observation
Oct 21, 2026
OpenAI APIWeb search: off
To validate canonicals, robots.txt, and noindex across a site, use a mix of crawler checks, URL-level spot checks, and search engine inspection tools.
1) Canonicals
What to verify
For each indexable page:
- It has a self-referencing canonical or an intentional canonical target.
- The canonical is:
- in the
<head> - absolute or valid relative URL
- returns 200 OK
- not blocked by robots.txt
- not pointing to a redirected, broken, or noindexed URL
- in the
- There is only one canonical tag per page.
- Canonicalized pages don’t conflict with:
- redirects
- hreflang
- pagination
- parameter handling
How to validate
- Crawl the site with tools like:
- Screaming Frog
- Sitebulb
- Ahrefs / Semrush site audit
- Export:
- page URL
- canonical URL
- status code
- indexability
- Look for:
- canonical chains
- canonical loops
- canonicals to 3xx/4xx/5xx URLs
- canonicals pointing to blocked pages
Quick checks
- View source or inspect DOM:
- search for
<link rel="canonical" ...>
- search for
- Test a sample URL with
curl:curl -I https://example.com/page
- Confirm the canonical target is reachable and correct.
2) robots.txt
What to verify
robots.txtis accessible at:https://example.com/robots.txt
- It returns 200 OK
- It does not unintentionally block important sections
- It includes correct directives for:
User-agentDisallowAllow- sitemap references
How to validate
- Open
/robots.txtdirectly in a browser or withcurl - Check that important pages and resources are not blocked
- Test with Google Search Console’s robots.txt tester if available
- Crawl the site and compare blocked URLs against your intended rules
Common issues
- Blocking CSS/JS needed for rendering
- Blocking canonical targets
- Accidentally disallowing whole directories
- Having outdated rules after site migrations
3) noindex
What to verify
- Pages meant to be excluded have:
<meta name="robots" content="noindex">- or an equivalent
X-Robots-Tag: noindexheader
- The page is crawlable if you want search engines to see the noindex
- The page is not blocked by robots.txt if you expect search engines to observe the noindex tag
Important note
If a page is blocked by robots.txt, search engines may not see the noindex tag at all.
So:
- Use noindex when you want crawlers to access the page but not index it
- Use robots.txt when you want to prevent crawling
- Don’t rely on robots.txt alone to deindex a URL
How to validate
- Check page source for:
<meta name="robots" content="noindex">
- Check headers for:
X-Robots-Tag
- Use
curl -I https://example.com/page - Use Google Search Console’s URL Inspection to confirm Google sees the noindex
4) Recommended workflow for a site-wide audit
Step 1: Crawl the whole site
Collect:
- URL
- status code
- canonical
- meta robots
- X-Robots-Tag
- indexability
- robots.txt blocked status
Step 2: Segment URLs
Group by:
- indexable pages
- noindex pages
- blocked pages
- redirected pages
- canonicalized pages
Step 3: Compare expected vs actual
Check for:
- indexable pages that are noindexed
- noindex pages that are still canonical targets
- blocked pages that should be indexed
- pages with conflicting directives:
noindex+ canonical to another URL- robots.txt disallow + noindex
- canonical to redirected URL
Step 4: Spot-check in search tools
Use:
- Google Search Console
- Bing Webmaster Tools
- live URL fetch/inspection where possible
5) Practical validation rules
A page is usually healthy if:
- It returns 200
- It is allowed by robots.txt
- It has a single correct canonical
- It has no contradictory robots directives
- It matches intended indexability
A page is suspicious if:
- canonical points somewhere else unexpectedly
- canonical target is blocked/noindexed/redirected
- robots.txt blocks pages you need indexed
- noindex pages are being canonicalized incorrectly
- multiple directives conflict
6) If you want a repeatable audit
You can automate this with:
- Screaming Frog custom extraction
- a script using
requests/httpx+ HTML parsing - Google Search Console API for URL inspection at scale
- log analysis to confirm bot behavior
If you want, I can give you:
- a Screaming Frog checklist,
- a Python script to validate these sitewide, or
- a Google Sheets audit template.