TrendPro LogoTrendPro
🤖

Robots.txt Generator — Create robots.txt File Free Online

SEO

Generate a robots.txt file for your website to control search engine crawling. Add rules for specific bots, block paths and include sitemap URL. Free robots.txt creator.

✓ Free✓ No Sign-up✓ Browser-based

Rule 1

About the Robots.txt Generator — Create robots.txt File Free Online

A robots.txt file sits at the root of your site, for example example.com/robots.txt, and tells crawlers which paths they may fetch. The most important thing to understand is that it controls crawling, not indexing. If you block a page in robots.txt, Google cannot read it, but it can still list the URL if other sites link to it. To keep a page out of search results, use a noindex tag and leave the page crawlable so Google can see the tag. A safe starting file for most sites has three lines: User-agent with an asterisk, then Allow with a slash, then a Sitemap line pointing to your sitemap.xml. Add Disallow lines only for areas with no search value, such as admin panels, cart and checkout pages, internal search results and temporary folders. WordPress sites usually disallow wp-admin but allow admin-ajax.php. Shopify generates its own robots.txt, which you edit through a template rather than a file. On Next.js you can place the file in the public folder or generate it from an app/robots.ts file. Do not block the _next folder: it holds the JavaScript and CSS Google needs to render your pages, and blocking it can hurt how your site is evaluated. Crawl-delay is ignored by Google, though some other crawlers respect it. Rules are matched by the most specific path, and paths are case sensitive. After you upload the file, test a few URLs in Search Console to confirm the pages you care about are not blocked by accident. One wrong Disallow slash can block your entire site, so always review the output before publishing.

How to Use the Robots.txt Generator — Create robots.txt File Free Online

  1. 1

    Choose a default rule: allow all crawlers, or block everything while you build a staging site.

  2. 2

    Add any folders you want to block, such as /admin/ or /cart/.

  3. 3

    Enter the full URL of your sitemap, for example https://www.example.com/sitemap.xml.

  4. 4

    Click Generate and read the output line by line.

  5. 5

    Save it as robots.txt in the root of your site, then test it in Google Search Console.

Advertisement

Frequently Asked Questions

Does robots.txt remove a page from Google?

No. It only stops crawling. Use a noindex tag to remove a page from results.

Should I block /_next/ on a Next.js site?

No. Google needs those files to render your pages.

Where does the file go?

At the root of your domain, so it loads at yourdomain.com/robots.txt.

Does Google obey Crawl-delay?

No. Google ignores it; use Search Console crawl settings if needed.

Can one mistake block my whole site?

Yes. Disallow with a single slash blocks everything. Always review before publishing.

Guides related to the Robots.txt Generator — Create robots.txt File Free Online

Related Tools