Bing and some others obey it; Google ignores it.
Your robots.txt
Save the file as robots.txt in the root of your site, so it opens at https://yourdomain.com/robots.txt.
Create a robots.txt file in seconds with this robots.txt generator. Choose which paths crawlers may visit, point them to your sitemap, block AI crawlers if you want to, and get warnings about the mistakes that most often hurt rankings.
How to use the Robots.txt Generator
- 1 Pick whether crawlers are allowed or blocked, or start from a WordPress, WooCommerce or Laravel preset.
- 2 List the paths to disallow, any exceptions to allow, and your sitemap URL. Tick any AI crawlers you want to block.
- 3 Copy the result or download robots.txt and upload it to the root of your site.
Worked examples
Input: Allow all, sitemap https://example.com/sitemap.xml
Result: User-agent: * Disallow: Sitemap: https://example.com/sitemap.xml
An empty Disallow line means nothing is blocked.
Input: Disallow /admin/
Result: User-agent: * Disallow: /admin/
Paths are case sensitive and start with a slash.
What robots.txt does
A robots.txt file is a plain text file at the root of your site (https://example.com/robots.txt). It tells well-behaved crawlers which parts of the site they may request. Search engines read it before they crawl.
It controls crawling, not indexing. A page blocked in robots.txt can still appear in search results if other sites link to it, usually with no description. To keep a page out of results, leave it crawlable and add a noindex tag instead.
The rules in plain words
User-agentnames the crawler a group of rules applies to.*means all of them.Disallowblocks a path.Disallow: /admin/blocks everything under that folder. An emptyDisallow:blocks nothing.Allowmakes an exception inside a blocked folder. When rules overlap, the most specific one wins.Sitemapgives the full URL of your XML sitemap.*matches any text and$marks the end of a URL, for exampleDisallow: /*.pdf$.
Mistakes to avoid
- Do not block CSS or JavaScript. Google needs them to render the page like a visitor sees it.
- Do not use robots.txt for secrets. The file is public, and it lists exactly what you want hidden. Protect private pages with a login.
- Check
Disallow: /. On its own it blocks the whole site. It belongs on staging servers only. - Remember it is case sensitive.
/Admin/and/admin/are different paths.
Blocking AI crawlers
You can list the user-agents of AI training and answer-engine crawlers and disallow them. Well-behaved crawlers respect the file, but scrapers that ignore robots.txt will not, and blocking does not remove content that has already been collected.
Frequently asked questions
Where do I put the robots.txt file?
In the top-level folder of your domain, so it opens at https://yourdomain.com/robots.txt. Each subdomain needs its own file. A robots.txt in a subfolder is ignored.
Does robots.txt remove a page from Google?
No. It stops crawling, but a blocked URL can still be listed if other pages link to it. Use a noindex tag, or remove the page, if you want it gone from results.
Should I block AI crawlers?
That is your decision. Blocking GPTBot, ClaudeBot and similar crawlers asks them not to use your content, but it can also reduce visibility in AI answers. It does not affect Google Search ranking.
Does Google obey Crawl-delay?
No. Google ignores Crawl-delay. Bing and some other crawlers respect it, and Google Search Console lets you limit its crawl rate.
How do I test my robots.txt?
Open yourdomain.com/robots.txt in a browser to check it is live, then use the robots.txt report in Google Search Console to see how Google reads it.
Related tools
Meta Tag Generator
Meta tag generator for SEO: build the title, description, canonical, robots, Open Graph and Twitter Card tags with a live search preview.
SERP Snippet Preview Tool
SERP snippet preview: see how your title tag and meta description may look in Google on desktop and mobile, with live character and pixel counts.
XML Sitemap Generator
XML sitemap generator: paste your page URLs and download a valid sitemap.xml, with duplicates removed and invalid URLs flagged.
UTM Link Builder
UTM link builder: create campaign URLs with utm_source, utm_medium and utm_campaign, keep your existing query string and avoid messy tracking data.
FAQ Schema Generator
FAQ schema generator: turn questions and answers into valid FAQPage JSON-LD to paste into your page, with a clear note on what Google shows today.
Keyword Density Checker
Keyword density checker: paste text to see your most-used words and two- or three-word phrases with counts and percentages.