Basic robots.txt Example

A minimal robots.txt example for public websites. It allows crawling and points crawlers to the sitemap.

robots.txt
User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml

How to use this example

  1. Replace example.com with the canonical host.
  2. Place the file at /robots.txt.
  3. Check it in Search Console after deployment.

Notes

  • robots.txt is public and not a security feature.
  • Use noindex or authentication for content that should not appear in search.

Related tools and fixes

Last updated: May 18, 2026