Build a valid robots.txt file in seconds: set the user-agent, the paths to block or allow and your sitemap URL, then copy or download the file.
A robots.txt file is a short text file at the root of your website that tells search engine crawlers which parts of the site they shouldn't crawl. It's one of the first files Googlebot requests, and a single wrong line can hide your whole site. This generator builds the file from a few simple fields, so the syntax is always correct.
* to give the rules to every crawler, or enter a specific bot such as Googlebot or Bingbot./admin/ or /cart/./admin/admin-ajax.php.Upload the file to the top level of your domain so it opens at https://yourdomain.com/robots.txt. Crawlers don't look for it anywhere else, and each subdomain needs its own file.
User-agent: * Disallow: /cart/ Disallow: /checkout/ Disallow: /account/ Disallow: /search Allow: /search/help Sitemap: https://example.com/sitemap.xml
Cart, checkout and account pages are different for every visitor and have no value in search results, and internal search pages can create endless URL combinations that waste crawl time. Everything else, including product and category pages, stays open.
Disallow: / blocks everything. It's common on staging sites and is sometimes copied to the live site by accident. If your pages suddenly disappear from Google, check this first.noindex meta tag instead./Admin/ and /admin/ are different rules.Bing and some other crawlers respect Crawl-delay, but Googlebot ignores it. Google adjusts its crawl rate automatically based on how quickly your server responds. Only add a delay if a specific bot is overloading your server.
Open your robots.txt in a browser to confirm it's live, then use the robots.txt report in Google Search Console (Settings ? robots.txt) to see the version Google fetched and any errors it found. Test an important page with the URL Inspection tool to confirm it isn't blocked.
Running WordPress? The WordPress robots.txt Generator starts from WordPress-specific rules. Make sure the sitemap you reference is valid with the XML Sitemap Generator, and read How to Create the Perfect Robots.txt File for SEO for more examples.