Meta Tag Robots and X-Robots-Tag Header Guide


The robots meta tag and the X-Robots Tag are used to instruct crawlers on find out how to index the pages of an internet site. The previous is indicated within the HTML code of an internet web page, and the latter is included within the HTTP header of a URL.

The method of indexing consists of a number of steps: 

  1. Loading the content material 
  2. Evaluation by search engine robots
  3. Inclusion within the database 

The data that has made it to the index is what seems within the SERPs. You’ll be able to make the most of robots meta tags and the X-Robots Tags to have management over what content material leads to the SERP and the way. 

Now, let’s get right down to the nitty gritty.

What’s the distinction between the X-Robots-Tag and the meta robots tag?

Table of Contents hide

Controlling how search engines like google and yahoo deal with net pages is essential. It permits web site homeowners to affect how their content material is found, listed, and introduced in SERPs. Two generally used management strategies embrace implementing the X-Robots-Tag and the meta robots tag. Each choices serve the identical objective, however they differ by way of implementation and performance. 

Let’s discover every one’s traits and evaluate them facet by facet.

Parameter Meta robots tag X-robots-tag
Kind HTML meta tag HTTP header
Scope Applies particularly to the HTML web page it’s included in Applies to the HTTP response for numerous file sorts, together with HTML, CSS, JavaScript, photographs, and so forth.
The place to set Throughout the <head> part of a web page On the server facet
Controls web page indexing Sure Sure
Permits bulk enhancing It’s doable however sophisticated Sure
Controls file sort indexing No Sure
Compatibility Extensively supported Restricted
Ease of implementation Simple Average, higher fits tech-savvies
Syntax instance <meta title=”robots” content material=” noindex, nofollow” /> X-Robots-Tag: noindex, nofollow

Let’s spotlight the next professionals and cons of utilizing every methodology: 

Robots meta tag professionals: 

  • Provides a simple and granular, web page degree method to managing indexing directions. 
  • Might be simply added to particular person HTML pages.
  • Extra broadly supported by varied search engines like google and yahoo, even native and fewer well-liked ones.

Robots meta tag cons:

  • Restricted to HTML pages solely, excluding different assets.
  • Sophisticated bulk enhancing course of. Chances are you’ll want to incorporate them manually on each single HTML web page.

X-Robots-Tag professionals:

  • Might be utilized to numerous assets referenced by the HTTP response.
  • Appropriate for eventualities the place HTML meta tags aren’t relevant, equivalent to serving non-HTML assets.
  • Allows administration of indexing directions for a number of pages or complete web site sections. 

X-Robots-Tag cons:

  • Requires server-level entry and information of server configuration, which could be difficult for web site homeowners who don’t have direct management over server settings or don’t know find out how to configure them.
  • Will not be supported by all search engines like google and yahoo and net crawlers.

Whatever the methodology you select, it’s essential to configure each robots meta tags and the X-Robots-Tag accurately to keep away from unintended penalties. Misconfigurations can lead to conflicting directives and may block search engines like google and yahoo from indexing your complete web site or particular pages.

What’s the distinction between the robots.txt file and the meta robots tag?

Robots.txt and meta robots tags are sometimes confused with each other as a result of they appear comparable, however they really serve totally different functions. 

The robots.txt file is a textual content file situated within the root listing of an internet site. It acts as a set of directions for net robots, informing them about which components of the web site they’re allowed to entry and crawl.

Meta robots tags and X-Robots-Tag give net crawlers indexing directions on which pages to index and the way. They’ll additionally dictate which components of the web page or web site to index and find out how to deal with non-HTML information.

So, the robots.txt file serves as a separate file and supplies crawling directions to go looking bots. The robots meta directive, however, supplies indexing directions to particular pages, information, and web site sections. 

By using these strategies strategically, you may management web site accessibility and affect search engine conduct.

Why it is best to use the meta robots tag and X-Robots-Tag

Let’s study how the robots meta tag and the X-Robots-Tag assist in search engine marketing and when it is best to use them.

1. Extra versatile management over web page indexing

Robots meta tags and the X-Robots-Tag offer you larger flexibility in controlling web page indexing. With these directives, you may handle indexing not only for complete HTML pages, but in addition for particular sections inside them, in addition to for non-HTML information like photographs or PDFs. You might be additionally free to decide on the appliance degree, whether or not on the web page degree utilizing robots meta tags or on the web site degree utilizing X-Robots-Tags.

2. Protecting the hyperlink juice

Blocking hyperlinks from crawlers by utilizing the nofollow directive may also help with sustaining the web page’s hyperlink juice. This prevents it from passing to different sources by exterior or inner hyperlinks.

3. Optimizing the crawl finances

The larger a web site is, the extra vital it’s to direct crawlers to probably the most useful pages. If search engines like google and yahoo crawl an internet site in and out, the crawl finances will merely finish earlier than bots attain the content material that’s useful for customers and for search engine optimization. This prevents vital pages from getting listed, or not less than from getting listed on schedule.

4. Controlling snippets

Along with controlling web page indexing, meta robots tags present the power to manage snippets displayed on the SERP. You get a spread of choices for fine-tuning the preview content material proven on your pages, enhancing your web site’s general visibility and enchantment in search outcomes. 

Listed below are a number of examples of tags that management snippets:

  • nosnippet instructs search engines like google and yahoo to not show meta descriptions for the web page.
  • max-snippet:[number] specifies how lengthy a snippet must be in characters.
  • max-video-preview:[number] describes how lengthy a video preview must be in seconds.
  • max-image-preview:[setting] defines the picture preview dimension (none/commonplace/giant).

You’ll be able to mix a number of directives into one, as an illustration:

<meta title="robots" content material="max-snippet:[70], max-image-preview:commonplace"/>

When to make use of meta robots directives

The primary (and commonest) case of utilizing meta robots directives is to dam pages from indexing. Not all pages can appeal to natural guests. Some may even hurt the positioning’s search visibility if listed. 

Amongst all web site pages, the next ones shouldn’t be listed:

  • Duplicate pages
  • Sorting choices and filters
  • Search and pagination pages
  • Technical pages
  • Service notifications (a few enroll course of, accomplished order, and so forth.)
  • Touchdown pages designed for testing concepts
  • Pages present process growth 
  • Data that isn’t up-to-date (future offers, bulletins, and so forth.)
  • Outdated pages that don’t carry any visitors
  • Pages you might want to block from sure search crawlers

You too can use totally different robots directives whenever you wish to management: 

  • Adopted hyperlinks
  • Non-HTML content material indexing 
  • Indexing of a specific web page component
  • And so on.

Meta robots directives and search engine compatibility

The robots meta tags and X-Robots-Tag use the identical directives to instruct search bots. Let’s overview them intimately.

Directive Its operate GOOGLE BING
index/noindex Tells to index/not index a web page. Used for pages that aren’t presupposed to be proven within the SERPs. + +
observe/nofollow Tells to observe/not observe the hyperlinks on a web page. + +
archive/noarchive Tells to indicate/not present a cached model of an internet web page in search. + +
nocache Tells to not retailer a cached web page. +
all/none All is the equal of index, observe is used for indexing textual content and hyperlinks.
None is the equal of noindex, nofollow is used for blocking indexing of textual content and hyperlinks.
nositelinkssearchbox Tells to not present a sitelinks search field within the SERP for this web page. +
nosnippet Tells to not present a snippet or video within the SERPs. + +
noodp Tells to not use an outline from the Open Listing Challenge. +
max-snippet Limits the utmost snippet dimension. Indicated as
max-snippet:[number] the place quantity is quite a lot of characters in a snippet.
+ +
max-image-preview Limits the utmost dimension for photographs proven in search. Indicated as max-image-preview:[setting] the place setting can have none, commonplace, or giant worth. + +
max-video-preview Limits the utmost size of movies proven in search (in seconds). It additionally permits setting a static picture (0) or lifting any restrictions (-1). Indicated as max-video-preview:[value]. + +
notranslate Prevents search engines like google and yahoo from translating a web page within the search outcomes. +
noimageindex Prevents photographs on a web page from being listed. +
unavailable_after Tells to not present a web page in search after a specified date. Indicated as unavailable_after: [date/time]. +
indexifembedded Permits content material indexing on the web page with noindex tag when that content material is embedded in one other web page by iframes or an analogous HTML tag. Each tags have to be current for this directive to work. +

All the abovementioned directives can be utilized with each the robots meta tag and X-Robots-Tag to assist Google bots perceive your directions.

Observe that search engines like google and yahoo routinely index a web site’s seen content material by default, so there isn’t any want to point index and observe directives for that objective.

Conflicting directives

If mixed, Google will select the restrictive instruction over the permissive one. For instance, the meta title=”robots” content material=”noindex, index”/> directive implies that the robotic will select noindex, and that the web page textual content received’t be listed.

The search engine will contemplate  the cumulative impact of the detrimental guidelines which might be relevant to it if a number of crawlers are specified together with totally different guidelines. For instance:

<meta title="robots" content material="nofollow"> 
<meta title="googlebot" content material="noindex">

This directive implies that the pages received’t be listed, and the hyperlinks received’t get adopted when crawled by Googlebot.

Mixed indexing and serving guidelines

You should use as many meta tags as you want individually or mix them in a single tag that’s separated by commas. As an illustration:

  • <meta title=”robots” content material=”all”/><meta title=”robots” content material=”noindex, observe”/> implies that the robotic will select noindex and the web page textual content received’t be listed, however it is going to observe and crawl the hyperlinks.
  • <meta title=”robots” content material=”all”/><meta title=”robots” content material=”noarchive”/> implies that all directions can be thought-about. The textual content and hyperlinks can be listed whereas hyperlinks resulting in a web page’s copy received’t be.
  • <meta title=”robots” content material=”max-snippet:20, max-image-preview:giant”> implies that the textual content snippet will comprise not more than 20 characters, and a big picture preview can be used.

If you might want to set directives to particular crawlers, creating separate tags is a should. However the directions inside one tab can nonetheless be mixed. For instance:

<meta title="googlebot" content material="noindex, nofollow">
<meta title="googlebot-news" content material="nofollow">

The robots meta tag: syntax and utilization

As we’ve mentioned earlier than, the robots meta tag is inserted into the web page’s HTML code and incorporates data for search bots. It’s positioned within the <head> part of the HTML doc and has two compulsory attributes: title and content material. When simplified, it seems like this:

<meta title="robots" content material="noindex" />

The title attribute 

In meta title=”robots”, the title attribute specifies the title of the bot that the directions are designed for. It really works equally to the Person-agent directive in robots.txt, which identifies the search engine crawler.

The “robots” worth is used to handle all search engines like google and yahoo. But when it’s important to set the directions significantly for Google, you’ll have to jot down meta title=”googlebot”. Another Google crawlers embrace:

  • googlebot-news
  • googlebot-image
  • googlebot-video

Bing crawlers embrace:

  • bingbot
  • adIdxbot
  • bingpreview
  • microsoftpreview.

Another search crawlers are:

  • Slurp for Yahoo!
  • DuckDuckBot for DuckDuckGo 
  • Baiduspider for Baidu

The content material attribute

This attribute incorporates directions on indexing each the web page’s content material and its show within the search outcomes. The directives defined within the desk above are used within the content material attribute.

Observe that:

  • Each attributes are usually not case-sensitive.
  • If attribute values aren’t included or written accurately, the search bot will ignore the blocking instruction.

Utilizing the robots meta tag

  • Methodology 1: in an HTML editor

Managing pages is just like enhancing textual content information. You must open the HTML doc in an editor, add robots to the <head> part, and save.

Pages are saved within the web site’s root catalog, which could be accessed by your private account with a internet hosting supplier or through FTP (File Switch Protocol). Save the supply doc earlier than making adjustments to it.

CMSs make it simpler to dam a web page from indexing. Many plugins have this performance, together with Yoast search engine optimization for WordPress, which lets you block indexing or forestall crawling of hyperlinks when enhancing a web page.

Robots meta tag in Yoast SEO plugin for WordPress
Supply: Yoast

X-Robots-Tag: syntax and utilization

The X-Robots-Tag is part of the HTTP response for a given URL and is usually added to the configuration file. It acts equally to the robots meta tag and impacts how pages are listed. However there are some cases when utilizing the  X-Robots Tag particularly for indexing directions is beneficial. 

Right here is a straightforward instance of the X-Robots-Tag:

X-Robots-Tag: noindex, nofollow

When you might want to set guidelines for a web page or file sort, the X-Robots-Tag seems like this:

<FilesMatch "filename">
Header set X-Robots-Tag "noindex, nofollow"

The <FilesMatch> directive searches for information on the web site utilizing common expressions. When you use Nginx as an alternative of Apache, this directive is changed with location:

location = filename {
  add_header X-Robots-Tag "noindex, nofollow";

If the bot title just isn’t specified, directives are routinely used for all crawlers. If a definite robotic is recognized, the tag seems like this:

Header set X-Robots-Tag "googlebot: noindex, nofollow"

When it is best to use X-Robots-Tag

  • Deindexing non-HTML information

Since not all pages have the HTML format and <head> part, some content material can’t be blocked from indexing utilizing the robots meta tag. That is when x-robots is useful. 

For instance, when you might want to block .pdf paperwork:

<FilesMatch ".pdf$">
    Header set X-Robots-Tag "noindex"

The robots meta tag supplies crawling directives after the web page is loaded, whereas the x-robots tag offers indexing directions earlier than the search bot will get to the web page. Utilizing x-robots helps search engines like google and yahoo spend much less time crawling the pages. This optimizes the crawl finances so search engines like google and yahoo can spend extra time crawling vital content material, making the X-Robots Tag particularly helpful for large-scale web sites.

  • Setting crawling directives for the entire web site

By utilizing the X-Robots-Tag in HTTP responses, you may set up directives that apply to your complete web site, slightly than separate pages.

  • Addressing native search engines like google and yahoo

Whereas the largest search engines like google and yahoo perceive nearly all of restrictive directives, small native search engines like google and yahoo could not know find out how to learn indexing directions within the HTTP header. In case your web site targets a selected area, it’s vital to familiarize your self with native search engines like google and yahoo and their traits.

The first operate of the robots meta tag is to cover pages from the SERPs. Alternatively, the X-Robots-Tag permits for broader directions to be set for the entire web site, informing search bots earlier than they crawl net pages and saving the crawl finances.

The right way to apply X-Robots-Tag

So as to add the X-Robots-Tag header, use the configuration information within the web site’s root listing. The settings will differ relying on the internet server.


It’s additionally beneficial to edit the next server paperwork: .htaccess and httpd.conf. If you might want to forestall all .png and .gif information from being listed within the Apache net server, add the next:

<Information ~ ".(png|gif)$">
 Header set X-Robots-Tag "noindex"


Modifying the configuration file conf can be vital. To stop all .png and .gif information from being listed within the Nginx net server, add the next:

location ~* .(png|gif)$ {
 add_header X-Robots-Tag "noindex";

Vital: Earlier than enhancing the configuration file, save the supply file to eradicate web site efficiency points in case there are some errors.

Examples of the robots meta tag and the X-Robots-Tag


Telling all crawlers to not index textual content on a web page and to not observe the hyperlinks:

<meta title="robots" content material=" noindex, nofollow" />
X-Robots-Tag: noindex, nofollow


Telling Google to not observe the hyperlinks on a web page:

<meta title="googlebot" content material="nofollow" />
X-Robots-Tag: googlebot: nofollow


Telling search engines like google and yahoo to not cache a web page:

<meta title="robots" content material="noarchive"/>
X-Robots-Tag: noarchive

When you don’t need Bing to cache pages, use the nocache directive:

<meta title="bingbot" content material="nocache"/>
X-Robots-Tag: nocache


Telling Google to not index and observe the hyperlinks in an HTML doc:

<meta title="googlebot" content material="none" />
X-Robots-Tag: googlebot: none


Telling search engines like google and yahoo to not show snippets for a web page:

<meta title="robots" content material="nosnippet">
X-Robots-Tag: nosnippet


Limiting the snippet to 35 symbols most:

<meta title="robots" content material="max-snippet:35">
X-Robots-Tag: max-snippet:35


Telling search engines like google and yahoo to indicate giant picture variations within the search outcomes:

<meta title="robots" content material="max-image-preview:giant">
X-Robots-Tag: max-image-preview:giant


Telling search engines like google and yahoo to indicate movies with out size limitations: 

<meta title="robots" content material="max-video-preview:-1">
X-Robots-Tag: max-video-preview:-1


Telling search engines like google and yahoo to not translate a web page:

<meta title="robots" content material="notranslate" />
X-Robots-Tag: notranslate


Telling crawlers to not index the pictures on a web page:

<meta title="robots" content material="noimageindex" />
X-Robots-Tag: noimageindex


Telling crawlers to not index a web page after a сertain date (January 1, 2021, for instance):

<meta title="robots" content material="unavailable_after: 2021-01-01">
X-Robots-Tag: unavailable_after: 2021-01-01

Checking robots directives in Google Search Console

You’ll be able to test web page indexation particulars utilizing Google Search Console’s URL Inspection software. This software exhibits you whether or not a web page is blocked from indexing and supplies particulars on the particular causes.

To entry the URL inspection software, navigate to the left-hand sidebar and click on on “URL Inspection.” Enter the URL you wish to test within the search bar. Beneath the “Crawl” part inside the Web page indexing particulars, you’ll see whether or not the web page is or isn’t listed and why. Within the supplied screenshot, the web page isn’t listed as a result of presence of a noindex directive within the robots meta tags.

Noindex in URL Inspection Tool

If a web page is blocked by the X-Robots-Tag, will probably be indicated within the report, as within the screenshot beneath.

X-robots-tag in URL Inspection Tool

If you wish to see the complete HTTP response obtained by Googlebot from the checked web page, you may have two choices:

  • To get real-time information, click on on Check dwell URL underneath the identical URL Inspection. As soon as the check is accomplished, click on on the View crawled web page. You’ll see the details about the HTTP response within the Extra information part.
  • To see the final crawl information, click on on the HTTPS -> Crawl -> View HTTP response straight within the URL Inspection.
HTTP response check in URL Inspection Tool

If a web page test exhibits that the robots meta tag doesn’t work, confirm that the URL isn’t blocked within the robots.txt file. You’ll be able to test it within the deal with bar or use Google’s robots.txt tester.

SE Rating additionally allows you to test which web site pages are within the index. To take action, go to the Index Standing Checker software.

Index Status Checker

It takes time for search engines like google and yahoo to index or deindex a web page. To ensure your web page isn’t listed, use webmaster providers or browser plugins that test meta tags (for instance, search engine optimization META in 1 CLICK for Chrome).

Widespread errors with robots and X-Robots-Tag utilization

Utilizing the robots and X-Robots-Tag could be tough, which is why it’s frequent for web sites to endure from associated errors. Conducting a technical search engine optimization audit may also help in figuring out and addressing these points. To present you a greater thought of what to anticipate when analyzing your web site, we’ve put collectively a listing of the most typical issues.

Battle with robots.txt

Official X-Robots-Tag and robots tips state {that a} search bot should nonetheless be capable of crawl the content material that’s meant to be hidden from the index. When you disallow a sure web page within the robots.txt file, the robots directives can be inaccessible to the crawlers. 

If a web page has the noindex attribute however is disallowed within the robots.txt file, it may be listed and proven within the search outcomes. An instance of that is when the crawler finds it by following a backlink from one other supply. 

To handle how your pages are displayed in search, use the robots meta tag and x-robots.

Including a web page to robots.txt as an alternative of utilizing noindex

The observe of utilizing the robots.txt file as a substitute for the noindex directive stems from the misperception that it’ll forestall a web page from being listed. It’s vital to notice that including a web page to the robots.txt file usually ends in disallowing crawling, not indexing. Which means crawlers can nonetheless index that web page (like with the backlinks that we talked about within the earlier part). 

So, when you don’t need your web page listed, it is suggested to permit it in robots.txt file and use a noindex directive. Alternatively, in case your objective is to stop search bots from visiting your web page throughout web site crawling, then disallow it within the robots.txt file.

Utilizing robots directives within the robots.txt file

One other frequent mistake when utilizing robots meta tags and X-Robots-Tags is together with them within the robots.txt file. This is applicable particularly to the nofollow and noindex directives.

Google has by no means formally confirmed that this methodology really works. What’s extra, by their analysis, the search engine came upon that using these directives could battle with  different guidelines, probably harming the positioning’s presence and place in search outcomes. So ever since September 2019, Google has deemed this observe ineffective and not accepts robots directives within the robots.txt file.

Not eradicating noindex in time

When working with staging pages, it’s frequent observe to incorporate a noindex robots directive to stop search engines like google and yahoo from indexing and displaying these pages in search outcomes. Whereas this method is suitable, it’s essential to recollect to take away this directive as soon as the web page is dwell. 

Failure to do that can result in a decline in visitors as search engines like google and yahoo received’t embrace the web page of their index. This additionally turns into a serious challenge when you don’t discover it in time (for instance, throughout web site migration). The issue can develop into a fair larger challenge if left unaddressed.


Detect crawling points together with 100+ different errors which will hinder your web site efficiency.

Constructing backlinks to a noindex web page 

Different web sites linking to a web page is usually seen as a optimistic sign by search engines like google and yahoo as a result of it signifies to them that the linked web page is effective and related. These backlinks contribute to the general authority and rating potential of the web page.

Nevertheless, if the linked web page has a noindex directive, search engines like google and yahoo will neither embrace it within the index nor present it in search outcomes, no matter what number of hyperlinks you construct. On this case, it is best to determine whether or not you need this web page to look in search and take away the noindex directive, or to construct hyperlinks to different pages as an alternative.

Eradicating a URL from the sitemap earlier than it will get deindexed

If the noindex directive is added to a web page, it’s unhealthy observe to immediately take away this web page from the sitemap file. It is because your sitemap permits crawlers to shortly discover all pages, together with these which might be meant to be faraway from the index. 

A greater different is to create a separate sitemap.xml with a listing of all pages containing the noindex directive. Then take away URLs from the file as they get deindexed. When you add this file into Google Search Console, robots are more likely to crawl it faster.

Not checking index statuses after making adjustments

It could occur that useful content material, and even your complete web site, can be blocked from indexing by mistake. To keep away from that, test your pages’ indexing statuses after making any adjustments to them.

How to not get vital pages deindexed? 

You’ll be able to monitor adjustments in your web site’s code utilizing SE Rating’s Web page Modifications Monitor. This software permits you to monitor each HTML code and index statuses for main search engines like google and yahoo.

Page Changes Monitor

What do you have to do when a web page disappears from the search?

When one in every of your vital pages doesn’t present up within the SERPS, test if there are directives blocking it from being listed or if there’s a disallow directive within the robots.txt file. Additionally, see if the URL is included within the sitemap file. You too can use Google Search Console to inform search engines like google and yahoo that you might want to have your web page listed and inform them about your area’s up to date sitemap. 


The robots meta tag and the X-Robots-Tag are each used to manage how pages are listed and displayed in search outcomes. However they differ by way of how they’re applied: the robots meta tag is included within the web page code, whereas the X-Robots-Tag is specified within the configuration file. 

Listed below are another vital traits of every to recollect:

  • The robots.txt file helps search bots crawl pages accurately, whereas the robots meta tag and X-Robots-Tag affect how content material is included within the index. All three parts are important for technical optimization.
  • Each the robots meta tag and X-Robots-Tag are used for blocking web page indexing, however the latter supplies directions to robots earlier than they crawl pages, conserving the crawl finances. 
  • If robots.txt prevents bots from crawling a web page, the robots meta tag or x-robots directives received’t work.
  • Errors in configuring the robots meta tag and the X-Robots-Tag can result in incorrect indexing points and web site efficiency issues. Set the directives rigorously or entrust the duty to an skilled webmaster.


Scroll to Top