{"id":397213,"date":"2026-11-09T22:37:31","date_gmt":"2026-11-09T22:37:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/shawesome-virtual-robots-txt-per-site-robots-txt-for-multisite\/"},"modified":"2026-11-09T22:37:03","modified_gmt":"2026-11-09T22:37:03","slug":"shawesome-robots-txt","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/shawesome-robots-txt\/","author":23594268,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.4","requires":"6.4","requires_php":"7.4","requires_plugins":null,"header_name":"shawesome robots.txt \u2013 Per-Site Rules for Single Sites and Multisite","header_author":"shawesome","header_description":"Its own robots.txt for a single site or for every site of a multisite network \u2013 edited in the admin, or deployed as a file to \/wp-content\/shawesome-robots-txt\/ (e.g. www.example.com \u2192 www-example-com.txt), which takes precedence.","last_updated":"2026-11-09 22:37:03","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/shawesome-code\/shawesome-robots-txt","header_author_uri":"https:\/\/shawesome.de\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":101,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"shawesome","date":"2026-11-09 22:37:03","revision":3793373}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3793373,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3793373,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3793373,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3793373,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3793373,"resolution":"1","location":"assets","locale":"","width":1280,"height":904},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3793373,"resolution":"2","location":"assets","locale":"","width":1280,"height":1090},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3793373,"resolution":"3","location":"assets","locale":"","width":1280,"height":760},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3793373,"resolution":"4","location":"assets","locale":"","width":1280,"height":1400},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3793373,"resolution":"5","location":"assets","locale":"","width":1280,"height":1260},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3793373,"resolution":"6","location":"assets","locale":"","width":1280,"height":880},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3793373,"resolution":"7","location":"assets","locale":"","width":1280,"height":740},"screenshot-8.png":{"filename":"screenshot-8.png","revision":3793373,"resolution":"8","location":"assets","locale":"","width":1280,"height":1100}},"screenshots":{"1":"Network settings: default mode, blocking of hidden sites, rules for sites with a path and the status interval.","2":"Network with subdomains: every site with its mode, the source of its robots.txt and its status.","3":"Network with subdirectories: sites with a path are served by the robots.txt of their host.","4":"Editor of a site: mode, rules and the output after saving.","5":"Crawler options: block AI crawlers, SEO tools, web archives, social media and search engines one by one.","6":"Path and file options: resources, WordPress cleanup and the sitemap.","7":"WooCommerce options: cart, checkout, my account, \"add to cart\" links and the folders for logs and files.","8":"Single site: the editor with the robots.txt generated by WordPress."}},"plugin_section":[],"plugin_tags":[9837,441,325,12753,186],"plugin_category":[51,55],"plugin_contributors":[291724],"plugin_business_model":[],"class_list":["post-397213","plugin","type-plugin","status-publish","hentry","plugin_tags-crawler","plugin_tags-multisite","plugin_tags-network","plugin_tags-robots-txt","plugin_tags-seo","plugin_category-multisite","plugin_category-seo-and-marketing","plugin_contributors-shawesome","plugin_committers-shawesome"],"banners":{"banner":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/banner-772x250.png?rev=3793373","banner_2x":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/banner-1544x500.png?rev=3793373","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/icon-128x128.png?rev=3793373","icon_2x":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/icon-256x256.png?rev=3793373","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/screenshot-1.png?rev=3793373","caption":"Network settings: default mode, blocking of hidden sites, rules for sites with a path and the status interval."},{"src":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/screenshot-2.png?rev=3793373","caption":"Network with subdomains: every site with its mode, the source of its robots.txt and its status."},{"src":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/screenshot-3.png?rev=3793373","caption":"Network with subdirectories: sites with a path are served by the robots.txt of their host."},{"src":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/screenshot-4.png?rev=3793373","caption":"Editor of a site: mode, rules and the output after saving."},{"src":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/screenshot-5.png?rev=3793373","caption":"Crawler options: block AI crawlers, SEO tools, web archives, social media and search engines one by one."},{"src":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/screenshot-6.png?rev=3793373","caption":"Path and file options: resources, WordPress cleanup and the sitemap."},{"src":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/screenshot-7.png?rev=3793373","caption":"WooCommerce options: cart, checkout, my account, \"add to cart\" links and the folders for logs and files."},{"src":"https:\/\/ps.w.org\/shawesome-robots-txt\/assets\/screenshot-8.png?rev=3793373","caption":"Single site: the editor with the robots.txt generated by WordPress."}],"raw_content":"<!--section=description-->\n<p>WordPress generates a virtual robots.txt with the same rules for every site. shawesome robots.txt lets you replace it \u2013 on a single site, or separately for every site of a multisite network, e.g. to block a staging domain or to point each site to its own sitemap.<\/p>\n\n<p><strong>Edit in the admin<\/strong><\/p>\n\n<p>The plugin page is under <em>shawesome \u2192 robots.txt<\/em> (in a network in the network admin) and has three tabs: <em>robots.txt<\/em>, <em>Settings<\/em> and <em>FAQ<\/em>. On a single site, the robots.txt tab shows the editor. In a network, it lists all sites with their mode, the source of their robots.txt, the active SEO plugins and a status \u2013 sites with errors first, filterable by status and searchable \u2013 and every site has its own editor. Next to the editor, the output shows a preview of the robots.txt after saving and, on request, the robots.txt crawlers currently get. Unsaved changes are marked and can be discarded. The content is stored in the site's database options \u2013 it survives domain changes and is removed together with the site. Leave it empty to keep the robots.txt generated by WordPress and SEO plugins.<\/p>\n\n<p>A button inserts example rules: the WordPress default plus the sitemap of the site.<\/p>\n\n<p><strong>Options per site<\/strong><\/p>\n\n<p>The editor of each site also sets the mode (see below) and two groups of options. A checked option always blocks or leaves out something.<\/p>\n\n<p><em>Crawlers<\/em><\/p>\n\n<ul>\n<li>a Crawl-delay (off by default, 10 seconds when switched on; Google ignores it, Bing and Yandex for example follow it)<\/li>\n<li>crawlers to block, one by one: AI crawlers (training, AI search, requests on behalf of users), SEO tools (Ahrefs, Semrush, Moz, Majestic and others), web archives, social media link previews and search engines \u2013 the last two are marked as not recommended<\/li>\n<\/ul>\n\n<p><em>Paths and files<\/em><\/p>\n\n<ul>\n<li>resources and assets: CSS and JavaScript files, images and PDF files are allowed unless checked<\/li>\n<li>WordPress cleanup: internal search results, reply links of comments, feeds of posts and archives<\/li>\n<li>WooCommerce (when active): cart, checkout, my account, \"add to cart\" links and the folders for logs and downloadable files<\/li>\n<li>the sitemap: by default, a Sitemap line for the sitemap of WordPress, or of Yoast SEO, Rank Math or All in One SEO while their sitemap replaces it, is added, unless the robots.txt already links it; it can be left out<\/li>\n<\/ul>\n\n<p>These lines are added at the end of the robots.txt, in both modes: blocked crawlers as a group of their own, everything else as a group for all crawlers (<code>User-agent: *<\/code>), which crawlers with a group of their own do not read. Like all of robots.txt, this only works with crawlers that follow it.<\/p>\n\n<p><strong>Or deploy a file<\/strong><\/p>\n\n<p>A plain text file in <code>\/wp-content\/shawesome-robots-txt\/<\/code> overrides the database content, e.g. for Git-based deployments. The file name is derived from the site's domain, with dots replaced by hyphens:<\/p>\n\n<ul>\n<li><code>www.example.com<\/code> \u2192 <code>www-example-com.txt<\/code><\/li>\n<li><code>shop.example.com<\/code> \u2192 <code>shop-example-com.txt<\/code><\/li>\n<\/ul>\n\n<p>As an unambiguous alternative, the domain with dots is accepted as well (<code>www.example.com.txt<\/code>); the hyphenated name takes precedence. While a file exists, the editor shows its content and the rules stored in the database read-only and offers to copy the file into the database; mode and options can still be changed. The switch \"Ignore the override file\" in the editor delivers the database rules instead, e.g. while a deployment cannot remove the file; it stays on if the file is deployed again. An empty file (or one with only whitespace) stands for the WordPress default, even if the site has rules in the database; the crawler options are still added.<\/p>\n\n<p>Override files can be read by anyone who knows their address, like the robots.txt itself. If WordPress can write there, the plugin creates the directory with an empty <code>index.php<\/code>, so that a web server with directory listing does not show the file names (and with them the domains of a network). To keep the files out of the web root, set <code>SHAWESOME_ROBOTS_TXT_DIR<\/code> to a directory outside of it.<\/p>\n\n<p><strong>Which sites get their own robots.txt<\/strong><\/p>\n\n<p>Crawlers only request robots.txt from the root of a host. A site gets its own robots.txt if its address has no path:<\/p>\n\n<ul>\n<li>a single site at the root of its domain<\/li>\n<li>every site of a network with subdomains or domains<\/li>\n<li>in a network with subdirectories: the main site and sites with their own domain<\/li>\n<\/ul>\n\n<p>Sites with a path (<code>example.com\/blog\/<\/code>) are served by the robots.txt of their host. By default, the plugin adds rules for them there \u2013 also in \"Exact\" mode, and it can be switched off:<\/p>\n\n<ul>\n<li><code>Disallow: \/blog\/<\/code> for sites hidden from search engines (WordPress only adds <code>noindex<\/code> to their pages)<\/li>\n<li><code>Sitemap: https:\/\/example.com\/blog\/wp-sitemap.xml<\/code> for public sites<\/li>\n<\/ul>\n\n<p>The Disallow lines are added as a group for all crawlers (<code>User-agent: *<\/code>). Crawlers that have a group of their own in the robots.txt do not read it.<\/p>\n\n<p><strong>Works with Yoast SEO and All in One SEO<\/strong><\/p>\n\n<p>Yoast SEO and All in One SEO change the robots.txt output. The mode decides how your content is combined with them. The default mode is set in the settings; each site can choose its own in its editor:<\/p>\n\n<ul>\n<li><strong>Base<\/strong> (default) \u2013 the content replaces the WordPress default; Yoast SEO removes the WordPress default rules (<code>User-agent: *<\/code>, <code>Disallow: \/wp-admin\/<\/code>, <code>Allow: \/wp-admin\/admin-ajax.php<\/code> in exactly this order) and appends its own rules and sitemap, All in One SEO rebuilds the rules (comments and Sitemap lines are dropped). Duplicate Sitemap lines are removed.<\/li>\n<li><strong>Exact<\/strong> \u2013 the content is delivered as is, after all SEO plugins have run. Sites without a custom robots.txt (no content in the editor and no file) keep the one from WordPress and the SEO plugins.<\/li>\n<li><strong>Blocking<\/strong> \u2013 all crawlers are blocked from all paths (<code>User-agent: *<\/code> \/ <code>Disallow: \/<\/code>), e.g. for a staging site. Rules and options of the site are kept, but not delivered.<\/li>\n<\/ul>\n\n<p><strong>Status<\/strong><\/p>\n\n<p>The status requests the robots.txt of each site as crawlers get it and shows whether all crawlers are blocked, how many sitemaps are linked, whether crawlers that collect content for AI training are blocked, and problems such as an unreachable robots.txt. The result is kept for a time set in the settings (24 hours by default); when the overview is opened after that time, outdated sites are checked again in the background. Each site or all sites can be checked again at any time.<\/p>\n\n<p><strong>Physical robots.txt<\/strong><\/p>\n\n<p>If a <code>robots.txt<\/code> file exists in the web root, the web server delivers it and WordPress is never asked. The robots.txt tab shows its content and \u2013 if WordPress may write to the web root \u2013 offers to rename it to <code>_old-robots.txt<\/code>, optionally after copying its content into the editor. The file is never deleted.<\/p>\n\n<p><strong>Search engine visibility<\/strong><\/p>\n\n<p>Sites set to \"Discourage search engines from indexing this site\" get \"Blocking\": all crawlers are blocked from all paths, whatever their mode \u2013 so a staging site stays out of search engines, even if the database was copied from production. WordPress itself no longer blocks such sites in its robots.txt, and SEO plugins may even allow everything. This can be switched off in the settings.<\/p>\n\n<p><strong>Notes<\/strong><\/p>\n\n<ul>\n<li>A UTF-8 BOM is stripped and line endings are normalized.<\/li>\n<li>In a network, the plugin is network-activated and the settings apply to all sites.<\/li>\n<li>The status is requested from the site itself (a loopback request). Some servers block such requests; the status then says so, and checking all sites stops after the first ones.<\/li>\n<li>Tested with small networks; larger networks have not been tested yet. The status check requests the robots.txt of every site, which takes longer in large networks.<\/li>\n<\/ul>\n\n<p><strong>For developers<\/strong><\/p>\n\n<ul>\n<li>Constant <code>SHAWESOME_ROBOTS_TXT_DIR<\/code> or filter <code>shawesome_robots_txt_dir<\/code> \u2013 change the directory for override files.<\/li>\n<li>Filter <code>shawesome_robots_txt_candidate_files<\/code> \u2013 change the candidate file paths for a domain.<\/li>\n<li>Filter <code>shawesome_robots_txt_priority<\/code> \u2013 change the priority of the <code>robots_txt<\/code> filter.<\/li>\n<li>Content, mode, status, the options and the switch \"Ignore the override file\" per site are stored in the site options <code>shawesome_robots_txt_content<\/code>, <code>shawesome_robots_txt_mode<\/code>, <code>shawesome_robots_txt_status<\/code>, <code>shawesome_robots_txt_rules<\/code> and <code>shawesome_robots_txt_ignore_file<\/code> (not autoloaded).<\/li>\n<li>All callbacks are named functions and can be removed with <code>remove_filter()<\/code>.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the folder <code>shawesome-robots-txt<\/code> to <code>\/wp-content\/plugins\/<\/code> or install the plugin via <em>Plugins \u2192 Add New<\/em>.<\/li>\n<li>Activate the plugin \u2013 in a network, network-activate it.<\/li>\n<li>Edit the robots.txt under <em>shawesome \u2192 robots.txt<\/em> (single site) or <em>Network Admin \u2192 shawesome \u2192 robots.txt<\/em> (network) \u2013 or place a text file per domain in <code>\/wp-content\/shawesome-robots-txt\/<\/code>, e.g. <code>www-example-com.txt<\/code>.<\/li>\n<li>Check the result with the \"Open live robots.txt\" link or at <code>https:\/\/www.example.com\/robots.txt<\/code>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"my%20robots.txt%20is%20not%20delivered.\"><h3>My robots.txt is not delivered.<\/h3><\/dt>\n<dd><p>Check on the robots.txt tab that there is no physical <code>robots.txt<\/code> in the web root and that the site is not set to \"Discourage search engines\". In a network, the overview shows the source and the status of every site. For files, check that they are readable by the web server.<\/p><\/dd>\n<dt id=\"i%20changed%20the%20content%20in%20the%20editor%2C%20but%20the%20old%20one%20is%20still%20delivered.\"><h3>I changed the content in the editor, but the old one is still delivered.<\/h3><\/dt>\n<dd><p>A file in <code>\/wp-content\/shawesome-robots-txt\/<\/code> overrides the database content. Delete the file, copy it into the database first with the button in the editor, or switch on \"Ignore the override file\" in the editor.<\/p><\/dd>\n<dt id=\"yoast%20seo%20or%20all%20in%20one%20seo%20changes%20my%20robots.txt.\"><h3>Yoast SEO or All in One SEO changes my robots.txt.<\/h3><\/dt>\n<dd><p>Select the mode \"Exact\" in the settings. The content is then delivered after all SEO plugins have run.<\/p><\/dd>\n<dt id=\"what%20does%20the%20status%20check%3F\"><h3>What does the status check?<\/h3><\/dt>\n<dd><p>It requests the robots.txt of the site as crawlers get it and shows whether all crawlers are blocked, how many sitemaps are linked and whether crawlers that collect content for AI training are blocked. The result is kept for the time set in the settings and can be checked again at any time.<\/p><\/dd>\n<dt id=\"does%20it%20work%20if%20wordpress%20is%20installed%20in%20a%20subdirectory%3F\"><h3>Does it work if WordPress is installed in a subdirectory?<\/h3><\/dt>\n<dd><p>If the address of the site contains a path (<code>example.com\/blog\/<\/code>), crawlers request the robots.txt from <code>example.com\/robots.txt<\/code>, which WordPress does not deliver. The plugin then does nothing and says so. If only the WordPress files are in a subdirectory and the address is the root of the domain, it works.<\/p><\/dd>\n<dt id=\"what%20happens%20on%20uninstall%3F\"><h3>What happens on uninstall?<\/h3><\/dt>\n<dd><p>The settings and the content stored in the database are deleted. Files in <code>\/wp-content\/shawesome-robots-txt\/<\/code> and a renamed <code>_old-robots.txt<\/code> are kept.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Its own robots.txt for a single site or for every site of a multisite network \u2013 edited in the admin or deployed as a file.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/397213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=397213"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/shawesome"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=397213"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=397213"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=397213"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=397213"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=397213"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=397213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}