Robots.txt Generator

FREE TECHNICAL SEO TOOL

Robots.txt Generator

Create a plain-text robots.txt file with crawler rules, allow and disallow paths, and one or more sitemap URLs. Validate the entries, preview the file, then copy or download it.

Path validationSitemap supportCopy and download

STEP 1

Configure crawler rules

All user agents listed here share the same Allow and Disallow rules.

01 / 03
Quick-start presetsChoose a pattern to populate the fields. Review it before generating.

Start with the default Allow all crawlers rule, then add only the restrictions you need.

ROBOTS.TXT GUIDE

Control crawler access without blocking the pages you want discovered

A robots.txt file helps communicate which parts of a website automated crawlers may request. The right rules can reduce unnecessary crawling, but an overly broad rule can prevent search engines from accessing important pages and resources.

Technical SEOCrawler managementSearch indexing basics

What is a robots.txt file?

Robots.txt is a plain-text file that follows the Robots Exclusion Protocol. It contains groups of instructions for automated crawlers. Each group starts with a User-agent line and can include Allow and Disallow rules for URL paths. A Sitemap line can point crawlers to an XML sitemap.

The file normally lives at the root of the website host. For example, the robots file for https://www.example.com is https://www.example.com/robots.txt. A robots.txt file in a subfolder does not control the whole host.

Key point

Robots.txt manages crawler access. It does not grant or deny access to human visitors, and it does not guarantee that a blocked URL will disappear from search results.

How to use this Robots.txt Generator

  1. 01
    Enter your website root URL

    This optional field displays the expected robots.txt address. Enter only the origin, such as https://www.example.com, not a page or folder URL.

  2. 02
    Choose the crawler

    Use * for all crawlers or enter a specific product token such as Googlebot. Add one token per line when the same rules should apply to multiple crawlers.

  3. 03
    Add disallow and allow paths

    Enter one URL path per line. Each path must begin with /. Use Allow only when you need to make a specific path accessible within a broader blocked path.

  4. 04
    Add sitemap URLs

    Enter complete sitemap URLs including https://. Multiple sitemap URLs are supported, with one address per line.

  5. 05
    Generate and review

    Check the preview for accidental site-wide blocks, incorrect paths and sitemap addresses before downloading.

  6. 06
    Upload and test

    Save the file as robots.txt in the root of the matching host, protocol and port. Open the public address in a private browser window and use Search Console’s robots.txt report to check it.

Understanding the robots.txt directives

CRAWLER TARGETUser-agent: *

Starts a group of rules. An asterisk targets all crawlers that use the general group.

BLOCK A PATHDisallow: /private/

Requests that matching crawlers do not fetch paths that match the specified pattern.

ALLOW A PATHAllow: /public/

Permits a matching path. It is often used to make a more specific path accessible within a blocked parent.

DECLARE A SITEMAPSitemap: https://example.com/sitemap.xml

Points crawlers to a sitemap using a complete URL with protocol and host.

Example: a simple robots.txt file

This example requests that general crawlers avoid a private directory, while allowing the public site to be crawled. Replace the sample domain and paths with values that match your own website.

User-agent: *
Disallow: /private/
Allow: /

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

Do not copy a sample rule blindly. Confirm that each directory exists and that blocking it will not prevent crawling of important content, images, stylesheets or scripts.

How Allow and Disallow rules work together

Search engines compare the requested URL path with the applicable rules. A more specific matching rule generally takes precedence over a broader one. Google uses the longest matching path rule and, for conflicting rules of equal specificity, chooses the less restrictive rule.

BLOCK A DIRECTORY
User-agent: *
Disallow: /members/
ALLOW ONE SUBPATH
User-agent: *
Disallow: /members/
Allow: /members/public/

In the second example, the more specific Allow rule makes the public subfolder available for crawling. Always test important URLs after publishing changes.

Wildcard patterns and case sensitivity

Google and other major search engines support a limited set of wildcard patterns in Allow and Disallow paths. The asterisk (*) matches zero or more characters, while the dollar sign ($) marks the end of a URL path.

Disallow: /*.pdf$Matches URL paths ending in .pdf.
Disallow: /search/Matches paths beginning with /search/.
Allow: /images/public/Allows a specific public image folder when a broader rule would otherwise block it.

Path matching is case-sensitive. For example, /Private/ and /private/ are different paths. Use wildcards carefully because a broad pattern can block more URLs than you intended.

Robots.txt does not prevent indexing or protect private content

CRAWLINGrobots.txt

Requests that compliant crawlers do not fetch matching URL paths. It is useful for managing crawl access.

INDEXINGnoindex

A page-level meta robots directive or X-Robots-Tag can tell search engines not to show a crawlable page in search results.

ACCESS CONTROLPassword protection

Authentication or server-side access controls prevent unauthorised visitors from accessing private resources.

A URL blocked by robots.txt may still appear in search results if Google discovers it through links. If a page must not appear in search, allow crawling so the crawler can read its noindex directive, or use an appropriate removal or access-control method. Do not block a page in robots.txt and expect Google to discover a noindex tag inside it.

Important rules for Google crawlers

  • Use supported directives. Google supports User-agent, Allow, Disallow and Sitemap. It does not support Crawl-delay.
  • Keep the file in the root. The file applies only to the host, protocol and port where it is published.
  • Use UTF-8 plain text. Avoid rich-text document formats and unexpected characters.
  • Include complete sitemap URLs. A Sitemap directive needs an absolute URL with the protocol and host.
  • Do not block rendering resources unnecessarily. Google may need CSS and JavaScript files to understand how a page is rendered.
  • Remember the size limit. Google processes up to 500 KiB of a robots.txt file.

WordPress and hosted website considerations

On a self-hosted WordPress website, robots.txt may be served as a virtual file or managed through an SEO plugin, hosting panel or a physical file in the web root. Check which method currently controls your file before adding another version. There should be one effective robots.txt file for each host and protocol.

Hosted platforms such as Blogger may provide their own crawler and indexing settings. Check the platform’s settings and documentation before attempting to upload or replace a file manually. A robots.txt file is not necessarily managed in the same way on every CMS.

How to upload and test your robots.txt file

  1. 01
    Download the generated file

    Save it with the exact filename robots.txt using plain-text UTF-8 encoding.

  2. 02
    Upload it to the site root

    Use your hosting file manager, SFTP or the CMS setting that manages crawler rules. Do not upload it into a content folder.

  3. 03
    Open the public file

    Visit https://yourdomain.com/robots.txt in a private browser window. Confirm that the expected text appears and that the server returns it successfully.

  4. 04
    Use Search Console

    For an accessible Google robots.txt file, review the robots.txt report in Search Console. Use URL Inspection to investigate whether a specific page is blocked from crawling.

  5. 05
    Review the affected pages

    Check important pages, images, CSS and JavaScript URLs. Remove any rule that unintentionally blocks resources needed to render or understand your pages.

Do not assume that downloading means publishing.

This generator creates a file on your device. You must upload it to the correct website root and verify the public robots.txt URL separately.

Common robots.txt mistakes to avoid

Disallow: /

Blocks crawling of the entire site for the matching crawler. Use only when that is genuinely intended, such as a protected test environment.

Using robots.txt for security

Disallowed paths can still be discovered. Protect private pages with authentication and server-side access controls.

Blocking CSS and JavaScript

Search engines may need these resources to understand the page. Do not block them without a specific technical reason.

Putting the file in a folder

A file such as /seo/robots.txt does not control crawling for the whole domain. Use the host root.

Using a relative sitemap path

Use a fully qualified sitemap URL, including https:// and the correct host.

Copying generic rules

Rules that work for one CMS, site structure or plugin setup may break crawling on another.

Frequently asked questions

What does a robots.txt file do?

It tells compliant automated crawlers which URL paths they may or may not request. It is mainly used to manage crawling, not to secure private content or guarantee removal from search results.

Where should robots.txt be located?

It belongs in the root of the host it controls, for example https://www.example.com/robots.txt. A file in a subfolder does not control the entire host.

Does robots.txt block pages from Google indexing?

Not reliably. A blocked URL can still be indexed if Google discovers it elsewhere. Use noindex on a crawlable page or password protection when you need to prevent access or indexing.

What does Disallow: / mean?

It tells the matching crawlers not to crawl any path on the host. Use it only when a full-site crawl block is intentional.

What is the difference between Allow and Disallow?

Disallow requests that matching paths not be crawled. Allow identifies paths that can be crawled and can override a less specific Disallow rule for search engines that support it.

Can I add more than one sitemap?

Yes. Add each complete sitemap or sitemap-index URL on its own Sitemap line. Google supports multiple sitemap declarations in robots.txt.

Does Google support Crawl-delay?

No. Google’s robots.txt parser does not support Crawl-delay. Use supported crawl-rate controls or Search Console guidance where applicable.

Does robots.txt protect passwords or private directories?

No. It is a public crawler instruction. Use authentication, permissions or server-side access restrictions to protect confidential content.

What if my robots.txt file returns a 404 error?

Google generally treats a 4xx response other than 429 as if no robots.txt file exists, meaning there are no crawl restrictions from that file. Check your intended rules and root URL carefully.

Does this generator upload the file to my website?

No. It generates and downloads a plain-text file. You must publish it to the root directory or use the crawler settings provided by your CMS.

Related technical SEO tools

Official references: Google’s robots.txt creation guide, Google’s robots.txt specification and IETF RFC 9309.

Leave a Comment