Free Robots txt Generator
Set crawl rules for any search engine bot — allow, block, or restrict specific paths and add your sitemap URL in one click.
Related Tools
What Is a Robots.txt File?
A robots.txt file sits at the root of your website (yourdomain.com/robots.txt) and tells search engine crawlers which pages they can and cannot access. It’s one of the first files Googlebot and Bingbot check when they visit your site.
A missing or misconfigured robots.txt won’t automatically hurt your rankings — but a wrong one can accidentally block your entire site from Google. This tool generates correctly structured robots.txt syntax so you don’t have to write it manually.
What You Can Control
Allow or block all bots — The default User-agent: * rule applies to every crawler. Set it to allow all pages, disallow all, or create a custom combination.
Target specific bots — Set separate rules for Googlebot, Google Image Bot, Bingbot, or any custom crawler. Useful for blocking AI training bots while keeping search engines.
Block specific paths — Prevent crawlers from accessing admin areas, login pages, duplicate content, or staging directories. Example: Disallow: /wp-admin/
Add your sitemap URL — Include your XML sitemap location so search engines can find and process it faster. Example: Sitemap: https://yourdomain.com/sitemap.xml
Set crawl delay — Ask bots to wait between requests, which reduces server load on smaller hosting plans.
How to Add robots.txt to Your Website
Once you’ve generated the file, upload it to your website’s root directory — the same folder where your homepage lives. For WordPress sites, you can paste the content directly into Rank Math or Yoast SEO under the robots.txt editor, or upload the file via FTP/cPanel.
After uploading, verify it’s accessible by visiting yourdomain.com/robots.txt in a browser. You can also test individual URLs using Google Search Console’s robots.txt tester to confirm your rules are working as expected before any crawl happens.
Common Pages to Block from Crawling
Most websites benefit from blocking a few standard paths. Admin and login pages have no SEO value and waste crawl budget. Search result pages (like /?s=query on WordPress) create near-duplicate content that Google doesn’t need to index. Staging or development directories should always be blocked to prevent test content from appearing in search results. If your site has a print-friendly version of pages or URL parameters that generate duplicate content, adding those to your disallow rules keeps your crawl budget focused on pages that actually matter for rankings.
