Introduction to robots.txt
What is robots.txt?
robots.txt is a text file located in the root of your site (e.g. https://yoursite.com/robots.txt) that serves as a set of instructions for web crawlers. With it you tell Google, Bing and other search engines which pages they may and may not index.
Think of it as a sign with the rules at the entrance of a building — it tells visitors where they can and cannot go.
Why is robots.txt important?
A properly configured robots.txt brings several key benefits:
- Indexing control — Prevent search engines from indexing pages that should not appear in search results
- Privacy protection — The admin panel, internal pages and draft content stay hidden from search engines
- Better SEO performance — Direct the search engines' crawl budget to the pages that really matter
- Data protection — Block access to JSON files, API endpoints and internal resources
- AI control — Decide whether AI assistants (ChatGPT, Claude, Perplexity) may recommend your site and whether AI companies may use your content to train models
How does robots.txt work?
When Google's bot visits your site, the first thing it does is fetch the robots.txt file. Based on the rules in it, the bot decides which pages it will visit and index.
Basic structure
User-agent: * ← This applies to ALL bots
Allow: / ← Allow access to the whole site
Disallow: /admin/ ← But block the admin panel
Key terms
| Term | Meaning |
|---|---|
| User-agent | Which bot the rule applies to (* = all bots) |
| Allow | Allow access to the given path |
| Disallow | Block access to the given path |
| Sitemap | The path to your XML sitemap file |
| Crawl-delay | How many seconds a bot should wait between requests |
What does Emit do for you automatically?
The Emit platform automatically generates a robots.txt for your site with sensible defaults:
Always protected (cannot be changed):
/admin/— Your admin panel/v1/and/api/— API endpoints- Login, registration and verification pages
.jsondata files- Editor resources (
/assets/src/)
Automatically allowed:
- All your public pages
- Blog posts
- Images and media files
- Your sitemap
Customisable:
- Blocking AI bots
- Crawl speed (crawl delay)
- Additional blocked paths
- Advanced custom rules
Next steps
In the next lesson we cover in detail how to configure robots.txt for your site through the Emit admin panel — including the AI bot toggle, adding custom rules and advanced options.
Tip: In most cases the default settings Emit generates are perfectly sufficient. Change them only if you have a specific need to block or allow access to certain pages.