Blog
How to Create a Robots.txt File: A Practical Guide
Create robots.txt rules for search crawlers, avoid common indexing mistakes, and test your sitemap reference.
Symboxi TeamSymboxi — Free online tools and browser games2 min read
What to know
A robots.txt file tells compliant crawlers which paths they may request. Place it at the root of the relevant origin, such as https://example.com/robots.txt. Rules apply to that origin, including its scheme and host. They are not passwords or access-control rules.
Worked example
Start with User-agent: * and Disallow: /private-preview/ if you intend to discourage crawling of that path. Add Sitemap: https://example.com/sitemap.xml on a separate line. For a public site, an empty Disallow value allows crawling. Keep sensitive pages behind authentication regardless of the file.
How to use the tool
Open the generator and enter the crawler rules and sitemap URL. Review the generated text before copying it into the root file. Confirm that important public pages and their necessary resources are not accidentally disallowed. Inspect the actual deployed robots.txt, not only the local version.
Frequently asked questions
Does Disallow remove a page from Google? Not necessarily: a URL can still be indexed without crawling. Use an appropriate noindex directive on accessible pages when exclusion from search is required. Does robots.txt protect private data? No. Should every site include a sitemap? It is useful for discovery, but it does not guarantee indexing.
Try the free tool
Open robots txt generatorRelated tool: xml sitemap generator.