Martech Zone AppsMartech Zone Builders

Robots.txt Generator: Import, Audit, and Optimize Your robots.txt File

A robots.txt file sits at the root of your site and tells crawlers which paths they may request. Search engines, shopping platforms, and AI bots all read it, and a single typo or a blocked CSS file can hide pages or break rendering. If you need the basics first, start with our guide to what a robots.txt file is.

This generator imports a live file, detects the platform behind the site, lists the issues, verifies the sitemap, and writes a rewrite that keeps the rules you meant to have. You can also start from a preset, block training or answer crawlers in one click, and copy or download the finished file.

Robots.txt Generator

Robots.txt Generator v1.0.0Last Update: Dec 2, 2026

Import a site to detect its platform, list the problems in its robots.txt, and optimize it, or build a new file from scratch below.

Optional — A domain or any URL on the site, such as example.com. We read its homepage and /robots.txt, detect the platform, and check the sitemap.

Build Your robots.txt

Optional — Used to turn sitemap paths such as /sitemap.xml into the absolute URLs robots.txt requires.
Start from a preset: Optional — Replaces the crawler groups below with the platform's recommended rules. AI crawler choices and sitemaps stay.
Crawler groups: Optional — Each group names one or more crawlers (User-agent) and the paths they may not (Disallow) or may (Allow) fetch. * means every crawler without its own group. The longest matching path wins.
+ Add Group
AI crawlers: Optional — Training crawlers collect pages to train AI models. Search and answer crawlers fetch pages so AI assistants can cite and link to you; blocking them removes you from those answers. Blocking never affects Googlebot or Bingbot.
Optional — One per line. Paths are made absolute with the Site URL. Sitemap lines always go at the end of the file.
Your robots.txt Copy Download
 
    Was this helpful?

    Enter a public site such as example.com (the field defaults to HTTPS) and click Import. The app fetches the homepage and /robots.txt through a server-side request that refuses private addresses, follows a limited number of redirects, and caches the result for an hour. Review the detected platform, the issue list, the verified sitemap, and the status of common AI crawlers, then click Optimize to see a change list and a line-by-line diff. Copy or download the rewrite, or open it in the builder to edit groups and rules by hand.

    If you do not have a live file yet, skip Import and start in the builder. Pick a preset (Allow All, Block All, WordPress, WooCommerce, Drupal, Joomla, Ghost, or Magento), add user-agent groups, and optionally block training or search-and-answer crawlers. Enter the site URL so Sitemap lines can be written as absolute addresses. Hosted platforms such as Shopify, Wix, Squarespace, Webflow, HubSpot, BigCommerce, and Duda generate the file for you, so import those sites instead of starting from a blank preset.

    How Robots.txt Works

    The file is organized into groups. Each group names one or more crawlers with User-agent and then lists Allow and Disallow rules. Google and most major crawlers follow the same matching rules (RFC 9309):

    • The longest matching path wins. If an Allow and a Disallow are the same length, Allow wins.
    • The only wildcards are * (any sequence) and $ (end of the path).
    • Groups that name the same crawler are merged. A group that names a specific crawler replaces the * group for that crawler.
    • A 4xx response means there are no rules, so crawlers treat the site as allowed. A 5xx or 429 response is treated as a temporary disallow-all.
    • Sitemap: lines should be absolute HTTPS URLs and belong at the end of the file. Crawlers ignore relative sitemap paths.
    • Noindex in robots.txt has been unsupported since 2019. Crawl-delay is ignored by Google and honored by Bing and Yandex. Host is a retired Yandex directive.

    Import, Audit, and Optimize

    Import scores platform signals from the homepage, response headers, and the file itself. WordPress, Shopify, Wix, Squarespace, Webflow, HubSpot, BigCommerce, Drupal, Joomla, Ghost, Magento, and Duda are detected when the evidence is strong enough. A few leftover /wp-admin/ lines alone will not mark a site as WordPress.

    The audit lists each issue with a severity, or it reports that there are none. Typical findings include typos, rules outside a group, a missing leading slash, a full URL used as a path, duplicate or conflicting rules, a file over Google’s 500 KiB reading limit, blocked CSS or JavaScript, and sitemap lines that are relative, on the wrong host, or broken. On WordPress, it also flags a /wp-admin/ block that does not allow admin-ajax.php, and a block on uploads.

    Optimize rewrites the file for the detected platform and keeps intentional rules: comments, blank lines, Crawl-delay, whole-site blocks, AI crawler choices, and Shopify’s default groups. It fixes clear mistakes, puts verified absolute Sitemap lines at the end, and explains every change as added, changed, removed, or kept. On Martech Zone, for example, the live file blocked /wp-admin/ without allowing admin-ajax.php; Optimize added that one Allow line and left everything else in place.

    Platforms and Where to Edit

    Where you paste the rewrite depends on the CMS. The import card tells you what the platform controls and where to edit the file:

    • WordPress: An SEO plugin such as Rank Math, Yoast, AIOSEO, or SEOPress usually writes the file. You can also filter it in the theme. The default is to disallow /wp-admin/ and allow admin-ajax.php.
    • Shopify: Add rules in robots.txt.liquid and keep the default groups loop, so Shopify can keep its own rules up to date.
    • Wix: Use the Robots.txt Editor in the dashboard. Wix still controls parts of the file.
    • Squarespace: The file is not editable. Use the Crawlers settings, including the AI crawler toggle, instead.
    • Webflow, HubSpot, BigCommerce, and Duda: The platform generates the file. Use each site’s SEO or robots settings, and import first so you start from the live rules.
    • Drupal, Joomla, Ghost, and Magento: These usually ship a file you can edit on disk or in the theme. Drupal’s core file can be overwritten by Composer scaffolding, so exclude it if you customize it.

    Blocking AI Crawlers

    The builder separates training crawlers (for example GPTBot, ClaudeBot, Google-Extended, and CCBot) from search and answer crawlers (for example OAI-SearchBot, ChatGPT-User, and PerplexityBot). Each bot is listed with a short explanation. You can block an entire group or tick individual crawlers. Optimize never changes those choices: if you allowed a training bot, the rewrite keeps it allowed.

    Blocking a training crawler is not the same as opting out of every AI feature. Some vendors also honor site-wide settings or official opt-out tags, and a search or answer bot may still visit to answer a user’s question even when the training bot is blocked.

    Common Issues the Audit Catches

    • A missing file (crawlers allow everything) or a server error (crawlers may treat the site as disallowed).
    • The file is over, or close to, the 500 KiB limit Google reads, or it starts with a hidden byte-order mark.
    • Unknown directives, typos, Noindex, Host, or rules that appear before any User-agent line.
    • A user-agent that looks like a full browser string, or a wildcard inside a crawler name (the * token only works on its own).
    • Paths that are missing a leading slash, use a full URL, or include mid-path $, **, or regular-expression syntax.
    • Duplicate rules, conflicting Allow and Disallow lines, or a Googlebot group that silently overrides the * rules.
    • A whole-site block for all crawlers, Googlebot, or Bingbot; blocked CSS or JavaScript (checked against the platform’s own defaults); or, on WordPress, a missing admin-ajax.php allow or a block on uploads.
    • Sitemap lines that are relative, served over HTTP, pointed at another host, broken, or missing. The app probes the platform’s usual sitemap paths when the file does not list a working one.

    Key Takeaways

    • Import a live robots.txt to see the platform, the issues, and the real sitemap before you rewrite anything.
    • Optimize keeps your intentional rules and explains every addition, removal, and change, with verified absolute Sitemap lines at the end of the file.
    • Paste the rewrite where the platform actually stores the file. Shopify uses robots.txt.liquid, Wix has an editor, and Squarespace is not editable in the file itself.
    • Use the AI crawler checkboxes to block training bots, search and answer bots, or both, and review each crawler before you save.

    Related Articles