Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Robots.txt Disallow: / deployed to production: how to fix it

OPS-305High impactPartlyBy FunnelGuardPublished Updated
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.

The staging file that should never reach productiontext
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.

How a staging robots.txt hurts the funnel
  1. DeployStaging robots.txt ships to production
  2. CrawlSearch bots obey Disallow: / and stop
  3. RankingsPages age out or lose snippets
  4. Organic visitsFewer people arrive
  5. Leads and salesFewer forms and orders

The site still works for people, so the damage is silent.

Organic leads per week after a bad deployExample numbers
Organic leads per week after a bad deploy (example)Week 0: 50 leads; Week 2: 47 leads; Week 4: 38 leads; Week 6: 27 leads; Week 8: 18 leads019385047382718Week 0Week 2Week 4Week 6Week 8leads

Example: illustrative numbers showing a slow decline after the file goes live, not measured data.

How to check if your site has it

Check your live robots.txt
  1. Open the file in a browser

    Go to https://yourdomain.com/robots.txt. Look for Disallow: / under User-agent: * with nothing after the slash.

  2. 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'.

  3. Check from the command line

    Run curl -s https://yourdomain.com/robots.txt and compare the output with the file you expect.

  4. 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.

A typical production robots.txttext
User-agent: *
Disallow:

Sitemap: https://yourdomain.com/sitemap.xml
Fix by platform
  1. Untick search engine visibility

    Go to Settings, then Reading, and clear 'Discourage search engines from visiting this site'. Save.

  2. 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.

  3. Check SEO plugins

    In Yoast SEO (Tools, File editor) or Rank Math (General Settings, Edit robots.txt), remove any Disallow: / rule.

After the file is replaced
  1. Test the live file

    Reload yourdomain.com/robots.txt in a private window and confirm the change.

  2. Ask Google to refetch it

    In Search Console, open the robots.txt report and request a recrawl of the file.

  3. Request indexing for key pages

    Use URL Inspection on your top landing pages and select Request indexing.

  4. 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

Confirmation checklist
  • 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.

Post-deploy check for your pipelinebash
#!/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
Prevention checklist
  • 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.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: indexable checks meta robots.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.