Technical SEO guide · Bahrain
Robots.txt vs noindex: choose the right search control
Robots.txt controls crawler access; noindex controls whether a crawled page should appear in search. They solve different problems and can conflict if used carelessly.
The useful numbers, with the conditions attached.
- Use robots.txt to manage crawling, not to guarantee deindexing.
- Use noindex for accessible pages that should stay out of Google results.
- Let Google crawl a noindex page so it can see the instruction.
Separate crawling from indexing
A robots.txt file gives crawl directives to compliant crawlers for URL paths. It can help prevent crawling of unimportant resources or endless URL spaces, but a blocked URL can still be known to Google through links or other signals. It is not a dependable way to remove a page already shown in results.
A noindex directive in a meta robots tag or HTTP header tells Google not to show the page in search after it is crawled. That makes it appropriate for pages that must remain accessible to users but have no standalone search value, such as thank-you pages or internal results.
- Use robots.txt for crawl management
- Use noindex for search-result exclusion
- Use redirects for permanent URL moves
Next decision: Image SEO: make images useful, accessible and searchable. If you want this applied to a live site, see the SEO audit scope.
Do not hide the noindex instruction
If robots.txt blocks Google from crawling a page, Google may not be able to see a noindex tag placed on that page. This is a common reason a removal plan fails. Allow crawling long enough for Google to process noindex, then monitor the result before adding a crawl block if one is still necessary.
Do not rely on a robots.txt ‘noindex’ rule: Google does not support it. The page’s response headers and rendered markup are the places to verify actual index controls. Test the live URL, not only a staging configuration or a plugin screen.
- Inspect live robots and response headers
- Allow crawling to process noindex
- Do not use unsupported robots.txt noindex directives
Match the control to the page’s purpose
For a permanently renamed service page, use a permanent redirect to the closest equivalent replacement. For a duplicate printable page, a canonical may be more suitable. For an internal search result, noindex is often appropriate. For a huge faceted URL pattern with no user value, crawl management and platform controls may be needed.
The correct answer can combine controls, but begin with a written outcome: should users access it, should Google crawl it, should it appear in search, and does another URL represent the content? This prevents settings from accumulating as a collection of unexplained plugin toggles.
- Write the desired user and crawler outcome
- Use one primary control per problem
- Document exceptions by URL pattern
Validate after deploying controls
Use Search Console URL Inspection and robots testing tools where available, then test representative URLs directly. Check canonical tags, status codes, internal links and sitemap inclusion too. A correct noindex page should not be presented in the sitemap as an important canonical destination.
Allow time for Google to revisit the URL. For urgent temporary removal of sensitive or outdated search results, use Google’s removal tools alongside a durable on-site solution. Removal tools do not replace the underlying robots, noindex, redirect or content decision.
- Test a sample from each template
- Keep sitemaps limited to intended canonical URLs
- Use urgent removals only alongside a durable fix
Common questions
Questions worth settling before you commit.
Can robots.txt remove a page from Google?
No. It controls crawling, not reliable deindexing. Use noindex or a suitable removal approach instead.
Should I block a noindex page?
Not before Google has had a chance to crawl and process the noindex directive.
Can I use noindex on a login page?
Often yes, provided it remains crawlable enough for the directive to be seen and there are no other security concerns. Authentication is the real access control.