Free Robots.txt Generator — Create Your Robots.txt File Easily
Select your options below. The tool generates a ready-to-use robots.txt file you can copy and upload to your site root.
Generated robots.txt output
User-agent: * Disallow: /admin/ Crawl-delay: 2 Sitemap: https://example.com/sitemap.xml
You accidentally blocked Google from your entire site once. Or you've never touched your robots.txt file. Either way, you probably need help.
This linkrify robots.txt generator creates the file for you. Select which bots to target, choose which folders to block, add a crawl delay, and include your sitemap URL. The tool builds the file instantly. Copy it. Upload it to your server. Done.
Below the generator, you'll learn what robots.txt actually does, common directives you'll actually use, and the one mistake that hides your whole site from Google.
What Is Robots.txt?
Robots.txt is a text file sitting in your website's root directory (example.com/robots.txt). It tells search engine crawlers which pages or folders they can access and which they should ignore.
Think of it as a "do not enter" sign for bots. A polite request, not a locked door. Most well-behaved crawlers (Google, Bing, Yahoo) respect it. Malicious scrapers ignore it.
What robots.txt can do
- Block crawlers from admin pages, login screens, or internal search results
- Prevent duplicate content from being indexed (like printer-friendly versions)
- Keep staging or development environments out of search results
- Point crawlers to your sitemap.xml file
- Slow down aggressive bots with crawl-delay
What robots.txt cannot do
- Hide pages from search results if other sites link to them (Google can still index)
- Block determined scrapers or hackers (they ignore robots.txt)
- Remove pages already indexed (use noindex meta tags or remove the pages)
- Protect sensitive data (use password authentication instead)
Common Directives You'll Actually Use
The robots.txt generator uses these standard directives. Here's what each means.
User-agent
Specifies which crawler the rule applies to.
User-agent: * — all crawlers
User-agent: Googlebot — Google's web crawler only
User-agent: Bingbot — Microsoft's crawler only
Most sites use * for everything. Use specific user-agents only when you need different rules for different bots.
Disallow
Tells crawlers NOT to access a specific path.
Disallow: /admin/ — blocks the entire admin folder
Disallow: /private-page.html — blocks a single page
Disallow: /images/ — blocks all images in that folder
Important: Disallow: / blocks your entire site. Don't use this unless you know what you're doing.
Allow
Tells crawlers they CAN access a specific path within a blocked parent folder.
Example:
Disallow: /admin/
Allow: /admin/public-info.html
This blocks the entire admin folder but allows one public page inside it.
Sitemap
Points crawlers to your XML sitemap file.
Sitemap: https://example.com/sitemap.xml
Add this to every robots.txt file. It helps crawlers find all your important pages.
Crawl-delay
Tells bots to wait X seconds between requests. Useful for slowing down aggressive crawlers on shared hosting.
Crawl-delay: 5 — wait 5 seconds between page requests
Googlebot ignores crawl-delay. Use Google Search Console's crawl rate settings instead.
When to Use a Robots.txt File
You don't always need one. An empty robots.txt file (or none at all) works fine for many sites. Use the robots txt generator when you have specific problems to solve.
Block admin pages
User-agent: *Disallow: /wp-admin/Disallow: /admin/Disallow: /cgi-bin/
Search engines don't need to index your login screens. Block them.
Prevent duplicate content
User-agent: *Disallow: /*?print=trueDisallow: /*?sort=
Parameter-based URLs create duplicates. Block the parameters.
Block staging environments
User-agent: *Disallow: /
Put this on staging.yoursite.com. Google won't index your test content.
Add sitemap reference
Sitemap: https://example.com/sitemap.xml
Add this even if you have no other rules. Helps crawlers discover your sitemap.
Common Mistakes That Kill Your SEO
One wrong line in your robots.txt file can hide your site from Google. Avoid these errors.
Mistake #1: Disallow: / on your live site
This blocks every crawler from every page. Your site disappears from search results. No warnings. No errors in Search Console. Just gone.
Fix: Never use Disallow: / unless you want to de-index your site.
Mistake #2: Blocking CSS, JS, or image files
Disallow: /css/Disallow: /js/Disallow: /images/
Google needs these files to render your pages correctly. Blocking them prevents Google from seeing your mobile layout.
Fix: Don't block assets. Block only admin pages, duplicate content, and parameters.
Mistake #3: Forgetting the sitemap reference
No sitemap means Google discovers your pages slower. New content takes weeks to appear instead of days.
Fix: Add Sitemap: https://yoursite.com/sitemap.xml to every robots.txt file.
Mistake #4: Multiple conflicting rules
Specific user-agent rules override wildcards. But this gets confusing fast. Keep your robots.txt simple.
Fix: Use one User-agent: * section for most rules. Add specific user-agents only when necessary.
Mistake #5: Not testing your file
You wrote rules. You think they work. But did you test?
Fix: Use Google Search Console's robots.txt Tester (under Settings > Crawling). Paste your file. See exactly which URLs are blocked or allowed.
Frequently Asked Questions
What is a robots.txt file?
How do I create a robots.txt file?
Where do I upload the robots.txt file?
Can I block Google from specific pages?
Disallow: /page-url/ under User-agent: Googlebot. Googlebot will stop crawling those pages. But if other sites link to those pages, Google might still index them without crawling. Use noindex meta tags for stronger blocking.What's the difference between robots.txt and noindex?
Does robots.txt hide my pages from Google?
What is crawl delay?
Should I block ChatGPT or AI crawlers?
User-agent: GPTBot followed by Disallow: / to block them. Most sites allow AI crawlers. Some block them. No SEO impact either way.Can I have multiple sitemap references?
Sitemap: https://example.com/sitemap1.xml then Sitemap: https://example.com/sitemap2.xml. Crawlers read all of them.How do I test my robots.txt file?
What happens if I don't have a robots.txt file?
Can I block bad bots with robots.txt?
Is this robots.txt generator free?
Generate Your Robots.txt File Now
You've got the tool at the top of this page. Select your rules. Copy the output. Upload to your site root. Test it in Google Search Console.
One wrong rule can hide your site. One correct rule can protect your admin pages and speed up crawling. Use the robots txt generator to get it right the first time.
Next, generate an XML Sitemap to help Google find all your pages. Check your Page Speed — fast sites get crawled more often. And run the SSL Checker to ensure your site loads securely before bots crawl it.
Powered by Linkrify — 28+ free tools, no sign‑up required.
