Free website check. Pro is $29 a month, cancel any time.Free check. Pro $29 a month.

Blocked by robots.txt: when to fix it and when not to

Blocked by robots.txt means your website has a rule telling Google not to crawl a particular page or group of addresses. That's fine for private areas such as admin pages and shopping carts, but a badly placed rule can stop Google reading your service pages, images and other important files.

A plumbing business owner checks website pages on a laptop beside a phone and notebook at an office desk.

Does every blocked page need fixing?

No. A blocked by robots.txt status only needs attention if Google should be able to visit that address. The robots.txt file contains instructions for search engine crawlers. It tells them which parts of your website they should leave alone.

Some pages have no business appearing in Google. Your admin login, shopping cart and checkout process are good examples. The same goes for internal search results. Someone looking for an electrician in their town needs your electrical repair pages, not a list of results from your website's own search box.

Problems start when a rule catches the wrong pages. Say your heating repair, boiler installation and air conditioning pages all sit inside a folder called /services/. If robots.txt blocks that folder, Google cannot crawl any of those pages. You might have spent days writing them, but the restriction stops Google reading their contents.

There's another detail that catches owners out. A blocked address can sometimes still appear in Google search results. Google might discover the URL through a link on another website, even though robots.txt prevents it from reading the page. Blocking a page and removing it from Google's index are two different things.

If your whole website is missing from Google, don't assume robots.txt is responsible. Our guide to why a website does not show up on Google covers other common causes and explains how to check them.

How do you check your robots.txt file?

Open a browser and type your main website address followed by /robots.txt. For example, if your website is example.com, visit example.com/robots.txt. You'll see a plain text file containing instructions for search engine crawlers. No paid SEO software needed.

Look for the word Disallow. This instruction tells a crawler not to visit addresses matching the path that follows it. One rule deserves particular attention:

User-agent: * Disallow: /

This tells all crawlers covered by the wildcard user-agent not to crawl any part of your website. It's a broad restriction. We've seen how easily this can become a problem when a developer moves a website from a test environment to its live address and forgets to remove the restriction. Your website can look completely normal to visitors while Google is still being told to stay away.

A rule aimed at one folder looks different:

User-agent: * Disallow: /services/

This restriction covers addresses under /services/. If that's where your main service pages live, Google cannot crawl them. Compare that with Disallow: /admin/, which has a much narrower purpose and is less likely to affect pages customers need.

Check the User-agent line above each group of rules, too. It identifies which crawler the instructions apply to. An asterisk means all crawlers, while a named crawler has its own instructions. Don't assume every Disallow line applies to every search engine. Read the group it belongs to.

How do you find the exact problem in Search Console?

Google Search Console's Page indexing report shows addresses Google has discovered but cannot crawl because of robots.txt restrictions. It's a useful place to start. You can see which URLs are affected before deciding if anything needs changing.

Open Google Search Console and select the correct website property. In the left-hand menu, go to Indexing, then Pages. Find the section showing why pages are not indexed. Look for the entry labelled Blocked by robots.txt and open it.

The report will show examples of affected addresses. Check several. Don't assume they all need the same treatment. One might be an internal search URL that should stay blocked. Another might be your boiler repair page, which customers should be able to find through Google.

To check one page more closely, open URL Inspection in the Search Console navigation. Paste in the full page address and inspect the indexing information. If Google reports that crawling is blocked by robots.txt, you've found a restriction preventing its crawler from reading that page.

There's another useful check in the Settings area. Open the robots.txt report to see information about Google's access to the file, including its fetching status and reported problems. Use this when the file seems to be missing, unavailable or incorrectly formatted. A successful fetch only means Google could retrieve the file. It doesn't mean the rules inside it are right.

Keep a short list of the affected URLs and what each page is supposed to do. Your website developer can work from that list. It's much easier to investigate a specific service page and its matching rule than to act on a general request to fix indexing.

How do you fix an accidental robots.txt block?

You need to change or remove the rule that's stopping Google from crawling a page it should be able to read. The correct edit depends on which addresses the rule catches. Don't start deleting instructions at random.

If you find Disallow: / on a live website that should be available to Google, that broad restriction needs removing or replacing with narrower rules. If the problem is Disallow: /services/, review that folder-specific instruction instead. Leave unrelated Disallow rules alone until you've checked what they protect.

Where you make the change depends on how your website was built. Some WordPress websites generate robots.txt instructions automatically. Others use a physical file stored on the server, or rules supplied by an SEO plugin. Editing a file in the wrong place won't change the instructions Google receives from your live website.

Once the change is made, visit /robots.txt again. Check the actual contents rather than trusting that someone saved the edit. Then return to URL Inspection and test one of the service pages that was blocked. Confirm Google is now allowed to crawl it before requesting another indexing check.

Check the supporting files, too. Your pages rely on images, stylesheets and JavaScript files. Google uses these resources to understand how a page looks and works. A robots.txt rule might leave the page itself accessible while blocking a folder containing the files it needs. That's easy to miss if you only test the main URL.

You can usually find the affected addresses and identify the suspicious rule yourself. The actual change is a different matter. If the restriction comes from server configuration, a WordPress plugin or custom website code, ask the person who built or maintains the site to handle it. Save a copy of the original robots.txt file before making any edits.

How do you keep a page out of Google without blocking it?

Use a noindex instruction when you want Google to crawl a page but leave it out of search results. This is different from robots.txt. Robots.txt controls crawling, while noindex tells Google not to include a page in its index.

A noindex instruction usually appears as a meta robots tag in the page's HTML:

<meta name="robots" content="noindex">

Google has to crawl the page to read that instruction. If robots.txt blocks the address, Google cannot reliably see the noindex tag. Putting noindex on a page while blocking it in robots.txt defeats the purpose. You've told Google to stay away from the very page where it needs to read your instruction.

Take a temporary campaign page as an example. Perhaps you've finished a promotion and don't want its old landing page appearing in Google. Leave the address crawlable and add a noindex tag to the page. Once Google revisits it and reads that instruction, it can remove the page from its index.

Don't confuse noindex with security. It won't stop someone opening the URL in a browser, and it won't protect private information. If a page contains sensitive details, use proper login protection and access controls.

After adding noindex, inspect the address in Search Console. Check that Google can crawl the page and see the instruction. If the page was already indexed, its removal can take time. Passing the inspection test doesn't mean the old search listing disappears immediately.

What should you check before changing anything?

Start with the pages your business needs customers to find. A blocked checkout page is usually nothing to worry about. A blocked emergency plumbing page, electrical repair page or main contact page is a different story. Those are addresses worth investigating.

Write down each affected address, the robots.txt rule that matches it and whether the restriction was intentional. Check the live file in your browser. An old copy from a developer might no longer match what's actually running on the website. Then inspect the important URLs individually in Search Console.

If several unrelated pages are blocked, look for a broad rule or a restriction affecting an entire folder. You may have one shared problem rather than several separate ones. If just one page is affected, look for a more specific instruction. Check the website hasn't carried over settings from its development or staging version, either.

FixGuider's free SEO audit checks whether Google can find and index your important pages, alongside seven other areas of your website. We send screenshots of your own pages on desktop and phone, with problems circled, numbered and explained in plain words. We inspect the site from the outside, so we never need your passwords or website access. You keep the audit whether or not you decide to have any work done.

Start with your live /robots.txt file. Copy its contents into a note, then compare the Disallow rules with the affected addresses in Search Console's Page indexing report. If a rule blocks a service page that should appear in Google, send the exact rule and page address to your website developer for review before changing the file.

New articles by email

One email per new article.

We email you a link to confirm first, and every email has a link to stop them. Privacy policy

[ Free check ]

Check your website free

Your website and your email. The check takes about 30 seconds.

  1. A 6-digit sign-in code arrives by email.
  2. Your home page is checked against Google’s search requirements.
  3. The result opens in your account, the critical problems first.
Free check · About 30 seconds