Fixing Robots Meta Directives
The robots meta tag tells search engines whether a page may be indexed, whether its links should be followed and how much of it can be shown in results. One wrong word can take a page out of Google, and a too-cautious setting can shrink its snippet or image to nothing.
The Meta Tag Analyzer reads the robots directives on each page and flags an unintended noindex, rules that contradict each other, values search engines do not recognise and preview limits that hold a page back. This guide explains every directive, where each one comes from, and how to set the right combination for each page type.
How the robots meta tag works
The tag sits in the head and holds one or more directives separated by commas:
<meta name="robots" content="noindex, nofollow">
Three things decide how it is applied:
- Everything is allowed by default. A page with no robots tag can be indexed, its
links followed and its content shown in snippets. That means
index, followdoes nothing; it is harmless, but you never need to add it. - The name chooses the crawler.
name="robots"applies to all search engines.name="googlebot"applies only to Google's crawler, andname="bingbot"only to Bing's. A crawler obeys the general tag and its own tag together. - The most restrictive rule wins. If one tag allows indexing and another forbids it, the page is treated as forbidden. Google applies the combination of all the directives it finds, from the meta tags and from the HTTP header.
A crawler can only obey a tag it can read, which means it has to be allowed to fetch the page. If
robots.txt blocks the address, the noindex is never seen. That trap has its own guide: noindex
and disallow clashes. This page is about the directives themselves.
Every directive, and when to use it
These are the values Google documents for the robots meta tag and the X-Robots-Tag header.
Bing supports most of them too. Values are not case sensitive.
| Directive | Effect | Typical use |
|---|---|---|
noindex | Keeps the page out of search results | Thank-you pages, internal search results, account areas, thin filter combinations |
nofollow | Asks search engines not to follow the links on the page | Rarely needed; pages of user-submitted links you cannot vouch for |
none | Same as noindex, nofollow | Easily mistaken for "no restrictions", so best avoided |
nosnippet | No text snippet or video preview in results | Very rarely justified on public pages |
max-snippet:[number] | Longest text snippet in characters; 0
means none, -1 means no limit | Publishers with licensing reasons to cap snippet length |
max-image-preview:[none|standard|large] | Largest image preview allowed | large
on almost every public page |
max-video-preview:[number] | Longest video preview in seconds; 0
means a still image only, -1 no limit | Video pages |
noimageindex | Images on this page are not indexed from it | Rarely; see the warning below |
notranslate | Google does not offer a translation of the result | Pages where machine translation would mislead |
indexifembedded | Allows content embedded in another page to be indexed there,
even when it carries noindex | Embeddable players and widgets; only works together
with noindex |
unavailable_after:[date] | Stops showing the page after the date given | Time-limited offers or event pages |
noarchive still appears in many templates. Google removed its cached page links in 2024
and says it no longer uses this directive, though other search engines such as Bing still may. Leaving
it in place is harmless; adding it for Google has no effect.
What the tag cannot do
The robots meta tag controls search results. It does not stop anyone reading the page, it does not
remove a page from AI training datasets, and there is no Google-documented meta value for that. Google's
control for its AI models, Google-Extended, is a robots.txt user agent, not a meta directive.
Unofficial values such as noai are not part of Google's documented list, so do not rely
on them.
Preview directives that quietly hold pages back
An accidental noindex is easy to spot once you look, because the page disappears. Preview
limits are harder, because the page still ranks; it simply appears with less.
max-image-preview
Without max-image-preview:large, Google may show only a small thumbnail next to a result,
or none at all in some features. Google recommends allowing large previews for pages that want to appear
in Discover with a large image. WordPress has added max-image-preview:large to its robots
tag by default since version 5.7, but custom themes, headless setups and other platforms usually do not.
For most public pages, the recommended tag is:
<meta name="robots" content="max-image-preview:large">
max-snippet and nosnippet
Some templates ship with max-snippet:50 or a similar small value copied from a publisher's
setup. That limits every text snippet to a few words. Google has also said its snippet controls apply
to how content is shown in its AI features in Search, so a very tight limit may reduce how much of the
page can be quoted there. Unless you have a licensing reason, remove small limits or use max-snippet:-1.
To keep one passage out of snippets without limiting the whole page, mark it with data-nosnippet
on a span, div or section element instead.
noimageindex
noimageindex stops the page's images appearing in image search from
that page, which can remove your product photos from a traffic source you did not know you had. It also
does not guarantee an image stays out: if another page links to or embeds the same file without the directive,
it can still be indexed. For images that genuinely must not be indexed, send X-Robots-Tag: noindex
on the image files themselves.Where unexpected directives come from
Robots rules are rarely typed into pages by hand. When the analyzer flags one nobody expected, it has almost always come from one of these places.
| Source | How it happens | Where to look |
|---|---|---|
| A staging or development setting | The site was built with indexing switched off and the setting went live with it | WordPress: Settings, Reading, "Discourage search engines from indexing this site". Other CMSs: an environment or SEO setting. |
| SEO plugin rules for a content type | A whole post type, taxonomy or archive set to hidden from search | The plugin's search appearance or titles settings per content type |
| A per-page switch | An editor ticked "do not show in search" on a page that later became important | The SEO box on the page edit screen |
| A theme or framework layout | A hard-coded robots tag in a header file | Search the
theme for name="robots" |
| The server or CDN | An X-Robots-Tag header added in Apache, nginx or CDN rules,
sometimes for a whole host | Response headers, server config, CDN transform rules |
| A hosting platform preview domain | Platforms add noindex to their temporary domains; fine there, a problem if that domain is the one linked | Check which host the analyzer fetched |
| JavaScript | A script adds or changes a robots tag after load | Compare View Source with the element inspector |
JavaScript deserves care. Google has said that if the served HTML contains noindex, it
may skip rendering the page, so a script that later removes the noindex may never run for Google. Put
the final value in the server HTML.
The X-Robots-Tag header
Files that are not HTML, such as PDFs, images and spreadsheets, cannot carry a meta tag. The same directives can be sent as an HTTP header instead, which also makes it possible to apply one rule to many files at once.
# Apache (.htaccess or virtual host): keep PDFs out of search
<FilesMatch "\.pdf$">
Header set X-Robots-Tag "noindex"
</FilesMatch>
# nginx: the same rule
location ~* \.pdf$ {
add_header X-Robots-Tag "noindex";
}
Because the header never appears in the HTML, it is the usual explanation when a page will not index and its head looks clean. Check the headers directly:
curl -sI https://www.example.co.uk/services/ | grep -i x-robots-tag
A header can also name a crawler, for example X-Robots-Tag: googlebot: nosnippet. Keep
robots rules in one place where you can. When some are in templates and others in server config, nobody
has the full picture.
A sensible default for each page type
| Page type | Suggested robots value |
|---|---|
| Home, services, products, categories, articles | max-image-preview:large (indexing allowed by default) |
| Paginated lists | Same as the first page; do not noindex page 2 onwards if the items are only reachable there |
| Internal search results | noindex |
| Basket, checkout, account, login | noindex |
| Thank-you and confirmation pages | noindex |
| Tag archives with one or two posts | noindex, or remove the archive |
| Staging and preview hosts | Password protection first; noindex as a back-up |
| Expired offers or events | unavailable_after set in advance, or remove and redirect afterwards |
noindex on its
own still lets search engines follow the links on the page, which helps them reach the pages that should
be indexed.The fix, step by step
Step 1
Collect every robots rule the page sends
Run the Meta Tag Analyzer on the flagged page and on one page of each other type. For each,
use View Source to list every meta name="robots" tag and any crawler-specific tags such
as googlebot, then run curl -sI to look for an X-Robots-Tag header.
Write the combined set down. Remember that the most restrictive directive across all of them is the one
that applies.
Step 2
Find where each directive is written
For
each directive you found, trace its source: the CMS indexing setting, the SEO plugin rule for that content
type, the per-page switch, a hard-coded tag in the theme, the server or CDN configuration, or a script.
Search theme files for name="robots" and server configs for X-Robots-Tag. Knowing
the source matters, because changing the page when the rule comes from the content type will not stick.
Step 3
Remove the noindex from pages that should rank
Before changing anything, confirm the page was not excluded on purpose, such as a
thank-you page or a filtered view. If it should be in search, remove the noindex at its
source, whether that is the site-wide setting, the content type rule or the page switch. Check that robots.txt
allows the address so crawlers can see the change, and that the page does not also carry a canonical
pointing somewhere else.
Step 4
Set preview directives deliberately
For
public pages, add max-image-preview:large to the robots tag in your template. Remove small
max-snippet values, nosnippet and noimageindex unless there is
a documented reason for them, such as a licensing agreement. Where only one passage should stay out of
snippets, use data-nosnippet on that element rather than restricting the whole page. Leave
noarchive alone if it is harmless, but do not add it for Google.
Step 5
Correct invalid values and duplicate tags
Fix typos that search engines will not recognise, such as no-index, noindex:true
or directives run together without commas. Replace none with the explicit pair if that is
really intended. Where the theme and a plugin both print a robots tag, turn one of them off so there
is a single tag per crawler. Move any rule added by JavaScript into the server-rendered HTML so every
crawler sees the same value.
Step 6
Confirm Google has picked up the change
Clear caches, then re-run the analyzer and curl -sI to confirm the page now
sends exactly the directives you intend. In Search Console, run URL Inspection on the live page to check
indexing is allowed, and request indexing for important pages. Watch the Pages report, where addresses
listed as "Excluded by 'noindex' tag" should move to indexed as Google recrawls them over the following
days or weeks.
Stopping stray directives coming back
- Check indexing after every launch and migration. The staging noindex going live is one of the most common causes of a site vanishing from search. Make "robots tag checked on live site" a launch checklist item.
- Monitor a few key pages. A scheduled check that fetches your home page and top pages
and alerts if
noindexappears in the HTML or headers catches accidents within hours rather than weeks. - Keep one owner for robots rules. Decide whether the CMS, the SEO plugin or the server sets them, and document any exceptions.
- Review after plugin and theme updates. Content type settings can reset when plugins are reinstalled or replaced. The WordPress meta tags guide covers where each plugin keeps these switches.
- Watch Search Console. A sudden rise in pages excluded by noindex is the clearest early warning you will get.
1. Do I need a meta robots tag saying index, follow?
No. Indexing and following links are the defaults, so a tag saying index, follow changes nothing. It does no harm if your theme or plugin prints it, and there is no reason to remove it. The only robots values worth adding to a normal public page are ones that change the default, and for most sites that means max-image-preview:large so that Google may show larger image previews for the page in results and in Discover.
2. How long does it take for a page to come back after removing noindex?
The page returns only after Google recrawls it and sees that the noindex has gone. For an important page you can speed this up by using URL Inspection in Search Console and requesting indexing, which often gets it recrawled within a few days. Pages Google visits rarely may take several weeks. Make sure the page is linked internally and listed in your sitemap, and that robots.txt does not block it, or the crawler cannot see the change.
3. What is the difference between noindex and nofollow?
Noindex keeps the page itself out of search results. Nofollow asks search engines not to follow the links on the page, so they are less likely to discover or credit the pages it links to. They are independent, and most pages that should be hidden only need noindex. Adding nofollow as well can make it harder for crawlers to reach other pages through that one, which is rarely what you want.
4. Should I use max-image-preview:large on every page?
For almost every public page, yes. Without it, Google may show only a small thumbnail next to your result or leave the image out of some features. Google recommends large previews for pages that want to appear in Discover with a big image. The main reason not to use it is a licensing restriction on your images. WordPress includes it by default in recent versions, but many custom sites and other platforms do not, so check your template.
5. Can I noindex a PDF or image?
Yes, but not with a meta tag, because those files have no HTML head. Send the X-Robots-Tag HTTP header instead, set in your server or CDN configuration. A rule matching the file extension lets you apply it to every PDF or image at once. Check the result with a header request to one of the files. Remember that a file already in the index will only drop out once it is recrawled and the header is seen.
6. Why does my page show noindex when my SEO plugin says it is indexable?
Because something other than the plugin is adding it. The usual suspects are the WordPress setting that discourages search engines, a hard-coded robots tag in the theme header, a second SEO plugin, an X-Robots-Tag header from the server or CDN, or a hosting preview domain. Since the most restrictive directive wins, any one of those overrides the plugin. Check the page source and response headers to find which source is sending it.
7. Does the robots meta tag stop AI tools using my content?
Not in general. The robots meta tag controls how search engines index and display pages. Google has said its snippet controls such as nosnippet and max-snippet also apply to its AI features in Search, but that is about display in Google Search. Opting out of training for Google's AI models is done through the Google-Extended user agent in robots.txt, and other AI companies publish their own crawler names. Unofficial meta values such as noai are not in Google's documented list.
The Meta Tag Analyzer reads the head of your page and checks robots directives alongside the title, description, canonical, viewport, Open Graph and X card tags.
Open Meta Tag Fixes โ