As a backend engineering lead with long experience in PHP/Laravel, Node.js, and backend systems, I’ve seen my share of tricky problems. One of the most frustrating is when a site simply isn’t getting indexed by search engines, despite all your efforts in SEO and content. Recently, I encountered a classic case of this with a WordPress site, and the culprit was a surprisingly simple, yet easily overlooked, setting.
The site had been telling search engines not to index it. Everything else about the site could have been perfectly optimized for SEO, but as long as this one setting was active, nothing would appear in search results.
How I Discovered the Problem
When I realized the site wasn’t being indexed, my first step was to check the `robots.txt` file. This file is often the first place search engine crawlers look to understand what parts of a site they are allowed to access. To my initial confusion, the `robots.txt` looked fine; it didn’t seem to contain any directives that would prevent indexing.
My next step was to inspect the page source of the site itself. I immediately found a critical piece of information in the `
` section of every page:<meta name="robots" content="noindex, nofollow" />This meta tag is a direct instruction to search engine crawlers, telling them not to index the page and not to follow any links on it. This discovery immediately told me that the problem wasn’t with `robots.txt` after all. While `robots.txt` offers suggestions to crawlers, a `meta robots` tag like this is a much stronger, page-specific directive that overrides `robots.txt` for that particular page.
Knowing that WordPress was emitting this `noindex` tag, I knew where to look next: the WordPress admin panel. I navigated to Settings → Reading, and there it was – the checkbox labeled “Discourage search engines from indexing this site” was checked.
The Root Cause: A Forgotten Development Setting
The “Discourage search engines from indexing this site” setting had been enabled since the site was first set up. It was a leftover from the development phase. When you install WordPress and point it at a temporary domain, or when you’re building a site that isn’t ready for public consumption, it’s a common and good practice to enable this setting to keep it private. However, it’s just as easy to forget to uncheck it once the site goes live.
In this particular case, no plugin or theme wizard had switched it on. It was simply the default “keep it private while I build” checkbox that had never been unchecked. It’s a subtle setting, and because it lives within the core WordPress reading settings, it can be easily overlooked when focusing on content, design, or more complex SEO configurations.
Evidence: What WordPress Emits When This Setting is On
When the “Discourage search engines from indexing this site” setting is active, WordPress takes two distinct actions to prevent indexing:
It injects a `meta robots` tag into the `` of every page:
<meta name="robots" content="noindex, nofollow" />This tag explicitly tells search engine bots not to index the content of the page and not to follow any links found on it. Because this tag is present on every page, even if Google or other search engines discover the URL through a sitemap or external links, they will respect this directive and will not add the page to their index.
It generates a `robots.txt` file that blocks all crawlers:
User-agent: * Disallow: /This `robots.txt` file instructs all user-agents (search engine bots) to disallow access to all content (`/`) on the site. While the `meta robots` tag is a stronger directive, the `robots.txt` further reinforces the message to stay away.
The combination of these two mechanisms ensures that a site remains completely hidden from search engine indexes.
My Refined Troubleshooting Checklist for Unindexed Sites
This experience has refined my approach to diagnosing why a site isn’t being indexed. I now follow a specific order of checks, prioritizing the most common and easily missed causes:
Check the page source for `noindex` meta tags: This is my absolute first step. By viewing the raw HTML of any page, I quickly look for `` or similar directives in the `
` section. This immediately tells me if there’s an explicit instruction to crawlers at the HTTP level.Check `robots.txt` for `Disallow: /`: After checking the page source, I inspect the `robots.txt` file. While it’s generally less authoritative than a `meta robots` tag, a blanket `Disallow: /` can certainly prevent indexing.
Check WordPress `Settings → Reading` for the “Discourage search engines” checkbox: This is where the problem often originates for WordPress sites. It’s a single checkbox that controls both the `meta robots` tag and the `robots.txt` output, making it a powerful and often overlooked setting.
Check SEO plugin settings for accidental `noindex` on post types: Many SEO plugins (like Yoast SEO or Rank Math) offer granular control over indexing for individual posts, pages, or entire post types. It’s possible to accidentally set a whole post type to `noindex` within these plugin settings.
Check sitemap validity: While a valid sitemap doesn’t guarantee indexing, an invalid or missing sitemap can hinder discovery. I ensure the sitemap is correctly generated and accessible.
Check Google Search Console for crawl errors: Finally, I look at Google Search Console (or equivalent for other search engines) for any reported crawl errors, security issues, or manual actions that might be preventing indexing. This provides direct feedback from Google itself.
In my experience, the WordPress “Discourage search engines from indexing this site” checkbox is the most common cause of complete non-indexing, and it’s also the easiest to miss because everything else on the site, including SEO plugin configurations, might appear perfectly normal. It’s a simple setting with profound implications, and it’s now firmly at the top of my troubleshooting list.




