
A robots.txt file and an XML sitemap work as a pair: one tells crawlers where not to go, the other lists the pages you'd like them to find.
Two small files help search engines find their way around your website: robots.txt and the XML sitemap. They're often mentioned together and sometimes confused. This guide explains what each one does, how to create them with free tools on Free Micro Apps, and the mistakes that cause real problems.
Both files have documented limits. Google's sitemap documentation says a single sitemap can hold up to 50,000 URLs or 50 MB uncompressed, and that submitting one is only a hint, not a guarantee of crawling. For robots.txt, the official standard, RFC 9309, says the file must be UTF-8 encoded, that crawlers should parse at least the first 500 KiB, and that robots.txt is not a form of access control. Anything truly private needs a password or a server-level block.
robots.txt is a plain text file at the root of your site, for example https://example.com/robots.txt. It gives instructions to crawlers (the automated programs search engines use to read the web) about which parts of the site they may visit.
A simple robots.txt looks like this:
User-agent: *
Disallow: /admin/
Disallow: /cart/
Sitemap: https://example.com/sitemap.xml
This says: all crawlers (*) should stay out of /admin/ and /cart/, and the sitemap is at the address given.
noindex meta tag instead.An XML sitemap is a file that lists the pages you want search engines to know about, often with the date each page was last updated. It's like a table of contents for crawlers.
A sitemap helps most when:
A sitemap doesn't guarantee that every listed page gets indexed. It's a strong hint, not a command.
The Robots.txt Generator builds a file for you. Choose which crawlers to address, add any folders you want to block, enter your sitemap address and copy the result.
Then:
robots.txt.yourdomain.com/robots.txt.Many website platforms (WordPress, Shopify and others) generate a robots.txt automatically. In that case, edit it through the platform's settings or an SEO plugin rather than uploading a new one.
The XML Sitemap Generator crawls your site and produces a sitemap file you can download. Upload it to your site's root, typically as sitemap.xml.
Again, many platforms create sitemaps automatically. WordPress, for example, has a built-in sitemap and most SEO plugins add their own. If yours already exists, you don't need a second one. Just make sure it's listed in robots.txt.
Once your sitemap is live, submit it in Google Search Console and Bing Webmaster Tools. This lets you see how many listed pages were indexed and spot errors.
The Search Engine Spider Simulator shows what a crawler sees on a page: the text, the links and the meta information, without the visual design. It's a useful way to check that important content isn't hidden in places crawlers struggle with.
To check whether a page has been indexed at all, try the Google Index Checker.
This line blocks everything:
User-agent: *
Disallow: /
It's sometimes left over from a development site and copied to the live site during launch. It's one of the most damaging and most common mistakes. After any launch or migration, check your robots.txt.
Search engines render pages much like a browser. If your robots.txt blocks the folders containing your CSS and JavaScript files, they may not see the page correctly. Don't block these resources.
Your sitemap should only include pages you'd like to see in search results: no redirects, no error pages, no duplicate versions, no pages marked noindex.
Sitemap URLs should match the version of your site that's live. If your site uses https://www.example.com, every URL in the sitemap should too. The WWW Redirect Checker confirms that the other versions redirect properly.
If your sitemap is a static file, it won't update itself when you add pages. Regenerate it after significant changes, or use a platform or plugin that updates it automatically.
These files take a few minutes to set up and very little effort to maintain, and they remove a common source of crawling problems. If you have questions, contact us.
Not strictly, but it's useful. Without one, crawlers assume they can crawl everything.
Not necessarily. A blocked URL can still be indexed if other pages link to it. Use a noindex tag on a crawlable page instead.
Usually at the root of your site, such as /sitemap.xml, and referenced in robots.txt with a Sitemap line.
Only the canonical pages you want indexed. Leave out duplicates, redirects and pages marked noindex.
Yes. Free Micro Apps has free robots.txt and XML sitemap generator tools.
Free Micro Apps is a Justin Zwick project. See all projects. Last updated .