Stop compliant crawlers from fetching a path
- Use
- A specific
Disallowrule in robots.txt - Why
- This controls crawling; it does not guarantee the URL stays out of search results
Find WordPress robots.txt, distinguish crawl rules from noindex, edit rules safely, and verify the live response.
WordPress generates a virtual robots.txt for a public site when no physical file is present. Check the live /robots.txt first, then use a host-level file or the robots_txt filter only when you have a specific crawl rule to add. robots.txt controls crawling, not indexing or privacy; use a page-level noindex directive when a URL should stay out of search results.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
https://your-domain.example/robots.txt in a browser. WordPress core can generate this response dynamically; the absence of a robots.txt file in the WordPress media library does not mean the route is missing. A physical file at the site root may be served by the web server instead, so always inspect the URL visitors and crawlers receive.Request /robots.txt on the canonical host and confirm it returns a successful response with plain-text rules. If a CDN, proxy, or host is involved, verify the public response after the change, not only a local WordPress preview.
In WordPress, open Settings > Reading and inspect Search engine visibility. The option is labeled Discourage search engines from indexing this site. Keep it unchecked for a public site intended to appear in search.
Use Search Console's URL Inspection tool to review an important public page after editing crawl rules. Confirm the page can be crawled and that its canonical URL is the one you expect.
WordPress core's do_robots() builds the virtual response, and the robots_txt filter lets code modify its output. If you already have a physical robots.txt, editing a plugin-generated view may not change the file the server serves.
Disallow rule in robots.txtnoindex directive and allow crawlingThe WordPress Reading setting and a robots.txt rule do different jobs. WordPress documents that the visibility setting adds a noindex,nofollow directive when the theme calls wp_head; the setting is advisory, and it does not require a login or otherwise make the site private. Check the rendered HTML as well as the robots response.
WordPress core provides the robots_txt filter for changing generated output. A small plugin can use that filter, while a physical root file is another option if your hosting setup serves it. Test the final response after deployment. For a public site, core already appends a Sitemap: line for its own index (/wp-sitemap.xml) to the generated output, so add a line only for a different sitemap your live site serves.
User-agent: *
Disallow: /staging/
Sitemap: https://example.com/wp-sitemap.xml/wp-admin/ but forgetting that WordPress core already includes a narrow rule for it on a public site. Inspect the generated output before adding a duplicate.noindex directive. A crawler cannot fetch the page to read a directive it is blocked from seeing./robots.txt before and after the change.Disallow: / rule on a site that should be indexed. Verify a representative page and sitemap after any edit.For the companion tasks, see the general noindex guide, WordPress XML sitemaps, and the robots.txt definition.
5 questions people ask next, answered from the sources on this page.
It is served at the site root, usually https://example.com/robots.txt. WordPress can generate a virtual file when no physical root file is present, so check the public URL rather than looking for a media-library file.
No. A robots.txt rule controls crawling and does not guarantee removal from search results. If a page should be excluded, let Google crawl it and use a page-level noindex directive.
Open Settings > Reading and clear Discourage search engines from indexing this site for a public site meant to appear in search. Then inspect the rendered page and /robots.txt to confirm the live response.
Check whether the server is serving a physical root robots.txt, or whether a plugin, host, or CDN is supplying a cached rule. Since WordPress 5.3, the Reading setting adds a noindex,nofollow robots meta tag when the theme outputs wp_head; it no longer relies on Disallow: /. Inspect both the public robots response and rendered page source.
No. A robots.txt file is public and does not restrict access. Protect staging with authentication or another access control; use crawl rules only as a crawler instruction.
Run the free audit, then approve the fixes. Every change can be undone.