The robots.txt file is one of the oldest and most important standards in SEO. Get it wrong and you can accidentally block your entire site from search engines.
The robots.txt file is a plain text file at the root of your website that tells search engine crawlers which URLs they are allowed or not allowed to request. It follows the Robots Exclusion Protocol.
https://yourdomain.com/robots.txtnoindex to prevent indexing.# Applies to all crawlers
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /api/
Disallow: /private/
# Block a specific bot
User-agent: BadBot
Disallow: /
# Sitemap location
Sitemap: https://example.com/sitemap.xml* means all)User-agent: *
Disallow: /admin/
Allow: /admin/loginUser-agent: *
Disallow: /*?sort=
Disallow: /*?page=User-agent: *
Disallow: /*.pdf$* (wildcard) and $ (end of URL). Bing supports them too. Other bots may not.Dr Urls checks your robots.txt for errors and misconfigurations. Try free.
Check your siteThe Sitemap directive tells crawlers where to find your XML sitemap. This is in addition to (not instead of) submitting it in Search Console.
Sitemap: https://example.com/sitemap.xml
Sitemap: https://example.com/sitemap-blog.xmlThe Crawl-delay directive asks crawlers to wait a specified number of seconds between requests. Google ignores this directive (use Search Console's crawl rate settings instead), but Bing and Yandex respect it.
User-agent: bingbot
Crawl-delay: 5Disallow: /Disallow: / is one of the most common SEO disasters. Always check robots.txt during deployment.yourdomain.com/robots.txt and verify the responseRun a comprehensive audit across SEO, security, performance, and accessibility. No sign-up required.
Check your website