We use cookies to keep this site working and, with your permission, to remember your preferences, understand site traffic and support advertising. You can change your choice at any time. Cookie Policy

SEO Tool Orbit

Robots.txt Generator

Free

Build a valid robots.txt file with allow/disallow rules and a sitemap reference.

100 free uses per day

Your result will appear here.

About This Tool

Robots.txt Generator builds a valid robots.txt file from a few simple choices: whether crawlers are allowed by default, which paths to block or allow, your sitemap address and an optional crawl delay. The file it produces applies to all crawlers (User-agent: *).

A robots.txt file tells well-behaved crawlers which parts of your site not to fetch. It sits at the root of your domain, and one wrong line can stop search engines from reading your whole site, so it's worth generating carefully.

How to Use Robots.txt Generator

  1. 1

    Choose the default policy

    Almost every public website should use Allow. Choosing Disallow with no paths blocks the entire site.

  2. 2

    List the paths to block or allow

    One path per line, starting with a slash, such as /cart/ or /admin/.

  3. 3

    Add your sitemap address

    Use the full address, including https://, so crawlers can find all your pages.

  4. 4

    Upload the file

    Save it as robots.txt in the root of your site, so it opens at yourdomain.com/robots.txt.

Example

A shop blocking its cart and checkout

Example

Input

Input
Default policy: Allow
Disallow paths: /cart/
                /checkout/
Sitemap: https://www.example.com/sitemap.xml

Output

text
User-agent: *
Disallow: /cart/
Disallow: /checkout/

Sitemap: https://www.example.com/sitemap.xml

Crawlers may fetch everything except the two listed folders, and the Sitemap line shows them where to find the full list of pages.

Examples are illustrative demonstrations, not live results — run the tool above for your own data.

Use Cases

A new website

Start with a correct file that points crawlers to your sitemap.

Keeping crawlers out of low-value areas

Stop crawlers spending time on carts, internal search results and filter pages.

Blocking a staging site

A staging copy can use the Disallow policy, ideally behind a password as well.

Tips for Better Results

  • Blocking isn't the same as hiding

    A blocked page can still appear in Google if other sites link to it. To keep a page out of results, use a noindex tag and don't block it, so Google can see the tag.

  • Don't block CSS or JavaScript

    Google needs them to render your pages properly and judge how they work on phones.

  • Don't list secrets

    Anyone can read robots.txt. Listing a private path just advertises it. Protect private areas with a login.

  • Crawl-delay has limited use

    Google ignores this setting, though some other crawlers honour it.

Important Notes

Paths are matched from the start of the URL and are case-sensitive, so /Admin/ and /admin/ are different. The rules cover only the exact host and protocol the file is served from, so a subdomain needs its own file. Robots.txt is a request, not a security control: well-behaved crawlers follow it, and others may not.

Frequently Asked Questions