Robots.txt Generator
A robots.txt file tells compliant crawlers which parts of a site they may crawl. It lives at the root of your domain (example.com/robots.txt) and contains User-agent, Allow, Disallow and Sitemap lines.
Create a robots.txt file
Robots.txt Generator
Create a custom robots.txt file for search engine crawlers.
How to use it
- Start from Allow All, Block All or Custom Rules.
- Choose the user-agent: all crawlers (*) or a specific bot such as Googlebot, Googlebot-Image, Bingbot or DuckDuckBot.
- List paths to disallow and allow, one per line.
- Add your sitemap URL, select Generate, then copy or download
robots.txt.
Example for a WordPress site
User-agent: * Allow: /wp-admin/admin-ajax.php Disallow: /wp-admin/ Sitemap: https://example.com/wp-sitemap.xml
Important limits
- robots.txt is not security. Anyone can read it, and badly behaved bots ignore it. Protect private content with a login.
- Blocking a URL doesn’t guarantee it stays out of search results. Google can index a blocked URL it finds through links. Use a
noindextag on a crawlable page to keep it out. - One mistaken
Disallow: /can stop a whole site from being crawled. Double-check before uploading.
How matching works
- Rules match the start of the URL path:
Disallow: /privatealso blocks/private-notes/. - Add a trailing slash to block only a folder:
Disallow: /private/. - Google supports
*as a wildcard and$to mark the end of a URL, e.g.Disallow: /*.pdf$. - When Allow and Disallow both match, Google applies the most specific (longest) rule.
- A crawler follows only the group for its most specific user-agent, so a Googlebot group overrides the * group for Googlebot.
Testing before you upload
After uploading, open https://yourdomain.com/robots.txt to confirm it’s live. Google Search Console’s robots.txt report shows the version Google fetched and any parsing errors. Check one important URL with the URL Inspection tool to make sure it isn’t blocked by accident.
Frequently asked questions
To the root of your domain so it’s reachable at https://yourdomain.com/robots.txt. WordPress also generates a virtual one, and SEO plugins let you edit it.
Commonly yes, while allowing /wp-admin/admin-ajax.php, which some front-end features use.
Related tools
- Canonical Tag GeneratorCreate a rel=canonical link tag and catch tracking parameters.
- Meta Tag CheckerPaste page HTML to audit the title, description, canonical, robots and more.
- Schema Markup GeneratorGenerate JSON-LD structured data for organizations, articles, products and more.
- Heading Structure CheckerPaste HTML to see the H1โH6 outline and spot skipped or empty headings.