On this page
What this issue is
A robots.txt file sits at the root of your site and tells crawlers which paths they may fetch. Staging sites usually carry a block-everything file so test pages stay out of search results. It looks like this: User-agent: * followed by Disallow: /.
The problem starts when a deploy, a copied folder, a database or settings sync, or a container image carries that file to production. Your live site now asks search engines to stay away from every URL.
User-agent: *
Disallow: /Why it costs you leads or sales
Search engines stop crawling new and updated pages. Over time, rankings drop, snippets go stale or lose their descriptions, and new landing pages never get discovered. Organic leads fall without any visible error on the site.
Paid campaigns can suffer too. Google Ads crawlers also read robots.txt, and blocking them can lead to landing pages being disapproved or reviewed as unavailable. Check the policy status in your ads account if you run Google Ads.
- DeployStaging robots.txt ships to production
- CrawlSearch bots obey Disallow: / and stop
- RankingsPages age out or lose snippets
- Organic visitsFewer people arrive
- Leads and salesFewer forms and orders
The site still works for people, so the damage is silent.
Example: illustrative numbers showing a slow decline after the file goes live, not measured data.
How to check if your site has it
Open the file in a browser
Go to https://yourdomain.com/robots.txt. Look for
Disallow: /underUser-agent: *with nothing after the slash.Check Google Search Console
Open Settings, then Crawl stats, and the robots.txt report. Also run URL Inspection on a key page and look for 'Blocked by robots.txt'.
Check from the command line
Run
curl -s https://yourdomain.com/robots.txtand compare the output with the file you expect.Check the Page indexing report
In Search Console, open Indexing, then Pages, and look for a rise in 'Blocked by robots.txt'.
How to fix it
Replace the file with a production version, then check that your deploy process can't overwrite it again. The right place to edit depends on your platform.
User-agent: *
Disallow:
Sitemap: https://yourdomain.com/sitemap.xmlUntick search engine visibility
Go to Settings, then Reading, and clear 'Discourage search engines from visiting this site'. Save.
Check for a physical file
If a real robots.txt exists in the site root, it overrides WordPress's virtual one. Delete or edit it over SFTP or your host's file manager.
Check SEO plugins
In Yoast SEO (Tools, File editor) or Rank Math (General Settings, Edit robots.txt), remove any Disallow: / rule.
Review robots.txt.liquid
Go to Online Store, Themes, Edit code, and look for templates/robots.txt.liquid. If a custom Disallow: / was added, remove it or delete the file to return to the default.
Check password protection
Under Online Store, Preferences, make sure the storefront password is off.
Edit the robots.txt field
Go to Site settings, then SEO, and find the robots.txt section. Remove the Disallow: / rule and publish.
Check indexing toggle
On the same SEO tab, make sure 'Disable Webflow subdomain indexing' only affects the .webflow.io domain, then republish the custom domain.
Open the robots.txt editor
Go to Marketing and SEO, then SEO Tools, then Robots.txt Editor. Remove the Disallow: / line and save.
Check search engine visibility
Squarespace builds robots.txt for you. Go to Settings, then Developer Tools or SEO, and make sure the site isn't hidden from search engines. Remove any password on the site.
Replace the file in the repo
Put the production robots.txt in your web root or public folder and redeploy.
Split by environment
Keep separate files, such as robots.prod.txt and robots.staging.txt, and have the build copy the right one. Never let staging settings overwrite production.
Purge caches
Clear your CDN and server cache so the old file is not served.
Test the live file
Reload yourdomain.com/robots.txt in a private window and confirm the change.
Ask Google to refetch it
In Search Console, open the robots.txt report and request a recrawl of the file.
Request indexing for key pages
Use URL Inspection on your top landing pages and select Request indexing.
Check meta robots too
Staging often also adds a noindex tag. View source on a key page and search for
noindex.
How to confirm it's fixed
- yourdomain.com/robots.txt shows the production rules, with no Disallow: / under User-agent: *
- Search Console URL Inspection no longer reports 'Blocked by robots.txt' for key pages
- The robots.txt report in Search Console shows the new version fetched
- No noindex in the page source or X-Robots-Tag header
- Pages blocked by robots.txt count is falling in the Page indexing report
How to prevent it happening again
Most cases come from a shared config or a copied folder. Remove the chance of that happening, then add a check that runs after every release.
#!/bin/sh
URL="https://yourdomain.com/robots.txt"
if curl -s "$URL" | tr -d '\r' | grep -qE '^Disallow:[[:space:]]*/[[:space:]]*$'; then
echo "robots.txt blocks the whole site"
exit 1
fi- Keep robots.txt per environment in version control
- Block staging with a password or IP allowlist, not only robots.txt
- Run the post-deploy check above and fail the release on a match
- Add robots.txt to your release checklist
- Set a Search Console alert contact so coverage warnings reach you
How FunnelGuard handles this
FunnelGuard detects this only partly. Its indexability check looks at meta robots on your pages, so it can flag a noindex left from staging. It does not read or alert on your robots.txt file, so a Disallow: / there can go unnoticed.
To cover the rest by hand, open yourdomain.com/robots.txt after every release, or add the post-deploy script above to your pipeline. Also review the Page indexing report in Search Console for 'Blocked by robots.txt'.
FunnelGuard's Free plan covers 1 site and 2 journeys with daily checks, no card needed. Paid plans have a 3-day free trial, and a free read-only website audit is available.
Questions people ask
Why is Google not crawling my site after a deploy?
Check yourdomain.com/robots.txt. If it shows User-agent: * and Disallow: /, a staging file probably shipped to production. Replace it with your production version and request a recrawl in Search Console.
What does Disallow: / in robots.txt mean?
It tells crawlers that follow the file not to fetch any URL on the site. It is useful on staging but harmful on a live site you want found in search.
How do I fix 'Blocked by robots.txt' in Search Console?
Edit your live robots.txt to remove the rule that matches the blocked URLs, then use the robots.txt report to request a recrawl. Finally, run URL Inspection on key pages and request indexing.
How long until Google picks up the corrected robots.txt?
Google usually refreshes robots.txt within about a day, but pages can take longer to be crawled and ranked again. You can speed it up by requesting a recrawl of the file and of key pages in Search Console.
Is robots.txt the same as a noindex tag?
No. Robots.txt stops crawling, while noindex tells search engines to leave a page out of results. Staging setups often use both, so check for each after a deploy.
Does a robots.txt block hurt my Google Ads?
It can. Google's ad crawlers read robots.txt, so blocking them may cause landing page problems. Review your ads account for disapprovals if the file was wrong while ads ran.
Can FunnelGuard alert me if my robots.txt blocks everything?
Not directly. FunnelGuard checks meta robots for indexability but does not check robots.txt. Add a post-deploy script or a manual check of robots.txt to cover that gap.
Related issues
- OPS-296Staging site indexed / publicly accessibleFix guide
- OPS-297Production noindex left from stagingFix guide
- OPS-295Staging config in production (API URLs, test keys)Fix guide
- OPS-292Deploy broke landing page or formFix guide
- OPS-307Change made without changelog (no root-cause trace)Fix guide
- OPS-293Deploy removed tracking snippetFix guide