Blocking an admin area
User-agent: *, Disallow: /admin, /api
User-agent: * Disallow: /admin Disallow: /api
Build a robots.txt with per-agent allow/disallow rules and a sitemap reference.
User-agent: * Disallow: /admin Disallow: /api Sitemap: https://example.com/sitemap.xml
Was this tool useful?
robots.txt is the first file a well-behaved crawler checks before touching anything else on a site — a plain-text set of rules saying which paths it may or may not fetch, per user-agent. It's a request, not a lock: a crawler that ignores robots.txt (some do) isn't stopped by it, but every major search engine respects it.
User-agent: *, Disallow: /admin, /api
User-agent: * Disallow: /admin Disallow: /api