Automated programs visit websites constantly. Some are search engine crawlers that discover and index pages. Some belong to AI companies that gather content to train models or to power AI search features. Others are tools that check uptime, monitor prices or scrape content. Website owners have some say over which of these visit, mainly through a small file called robots.txt.
What robots.txt does
The robots.txt file sits at the root of your site, such as example.com/robots.txt. It contains rules telling crawlers which parts of the site they may or may not crawl. Rules are addressed to specific crawlers by their user-agent name, or to all crawlers at once.
Two important limits are worth understanding:
- Robots.txt is a set of instructions, not a lock. Reputable crawlers follow it, but poorly behaved bots may ignore it.
- Blocking crawling is not the same as preventing a page from appearing in search. Google can sometimes index an address it has not crawled if other pages link to it. To keep a page out of Google results, a noindex setting is the documented approach, and the page must not be blocked by robots.txt so that Google can see that setting.
AI crawlers you may see
Several AI companies publish the names of their crawlers and explain how to control them. For example, OpenAI has documented separate user agents for gathering training data and for its search features. Google has documented a product token called Google-Extended, which lets sites control whether their content is used to help train and improve certain Gemini models, and Google has said it does not affect inclusion or ranking in Google Search. Other companies publish similar information. Names and purposes change, so check each company’s current documentation before writing rules.
Questions to ask before blocking
There is no single right answer. It depends on your goals.
- Do you want to appear in AI-powered search answers? Blocking a company’s search crawler may reduce your chances of being cited in its assistant’s results. For many local businesses, being findable everywhere customers search is valuable.
- Are you comfortable with your content being used for model training? Some businesses with original creative or premium content prefer to opt out of training crawlers while still allowing search crawlers.
- Is a crawler causing problems? If a bot is putting heavy load on your server, your hosting provider may be able to help with rate limits or firewall rules beyond robots.txt.
Making changes carefully
A small mistake in robots.txt can block search engines from your entire site. Before editing it:
- Save a copy of the current file.
- Make one change at a time and write down why.
- Never add a rule that blocks all crawlers from the whole site unless you truly intend to.
- Use the robots.txt report in Google Search Console to check that Google can fetch and read the file.
- Review the file at least once a year, since new crawlers appear and old rules can become outdated.
Many website platforms and SEO plugins provide a way to edit robots.txt without touching files directly. If you are unsure, ask whoever manages your site. A clear, intentional robots.txt file lets you decide, rather than guess, who gets to read your website.
Reading a Robots.txt File
Robots.txt files look technical, but the basic structure is simple. Each group of rules starts with a line naming a crawler, followed by lines saying what it may or may not crawl. A simplified example might look like this, written out in words:
- User-agent: * means the rules that follow apply to all crawlers.
- Disallow: /wp-admin/ asks those crawlers not to crawl the admin area.
- Allow: /wp-admin/admin-ajax.php makes an exception for one file inside that area that some sites need crawlable.
- User-agent: followed by a specific crawler’s name starts a separate group of rules just for that crawler.
- Sitemap: followed by a full address tells crawlers where your XML sitemap lives.
Two details trip people up. First, a line reading Disallow: / blocks the entire site for the crawlers it applies to, which is rarely what a business wants for search engines. Second, an empty Disallow: line with nothing after it means nothing is blocked. The difference is a single character, which is why careful review matters.
Three Common Approaches
Most small business sites end up with one of a few broad approaches.
Open to all
The site allows search crawlers and AI crawlers alike, blocking only admin and utility areas. This suits businesses whose main goal is to be found wherever customers look.
Search yes, training no
The site allows search engine crawlers and the search-related crawlers of AI companies, but disallows crawlers that companies document as being used for model training. This suits businesses with original content they would rather not contribute to training, while still wanting visibility.
Restricted
The site blocks most automated access beyond major search engines. This is less common for local businesses, since it can reduce visibility in newer search tools.
Whichever approach you choose, write it down along with your reasons, so the next person to edit the file understands the intent.
Mistakes That Cause Real Damage
- Leaving a development block in place. Sites built on a staging server are often set to block all crawlers. If that setting carries over at launch, the live site can disappear from search. Check robots.txt as part of every launch.
- Blocking files a page needs. Blocking style or script folders can prevent search engines from rendering pages properly.
- Using robots.txt to hide private information. The file is public, so anyone can read it. Listing a sensitive folder in it can actually draw attention to it. Private content needs real access controls, such as passwords.
- Copying rules from another site. Another site’s file reflects its own structure and goals, which may not match yours.
Questions Readers Ask
How quickly do crawlers notice changes?
Reputable crawlers check robots.txt regularly, but not instantly. Expect changes to take effect over a period of days rather than minutes.
Can I block a bot that ignores robots.txt?
Not with robots.txt alone. Your host or a security service may be able to identify and limit that traffic at the server or network level.
Does blocking AI crawlers remove content they already collected?
Generally, robots.txt rules govern future crawling. Each company’s documentation explains how it handles content gathered before a change.




