Seo, in its the majority of fundamental sense, trusts one thing above all others: Online search engine spiders crawling and indexing your website.
However almost every website is going to have pages that you don’t wish to consist of in this expedition.
In a best-case situation, these are not doing anything to drive traffic to your site actively, and in a worst-case, they might be diverting traffic from more important pages.
Luckily, Google permits webmasters to tell online search engine bots what pages and material to crawl and what to neglect. There are a number of ways to do this, the most common being using a robots.txt file or the meta robotics tag.
We have an exceptional and detailed explanation of the ins and outs of robots.txt, which you must certainly check out.
However in high-level terms, it’s a plain text file that lives in your website’s root and follows the Robots Exemption Protocol (REPRESENTATIVE).
Robots.txt supplies spiders with instructions about the site as an entire, while meta robotics tags consist of instructions for particular pages.
Some meta robotics tags you might use consist of index, which informs search engines to add the page to their index; noindex, which informs it not to include a page to the index or include it in search results; follow, which advises an online search engine to follow the links on a page; nofollow, which tells it not to follow links, and a whole host of others.
Both robots.txt and meta robotics tags are useful tools to keep in your tool kit, however there’s also another way to instruct online search engine bots to noindex or nofollow: the X-Robots-Tag.
What Is The X-Robots-Tag?
The X-Robots-Tag is another way for you to control how your webpages are crawled and indexed by spiders. As part of the HTTP header reaction to a URL, it controls indexing for a whole page, in addition to the specific elements on that page.
And whereas using meta robotics tags is fairly simple, the X-Robots-Tag is a bit more complex.
However this, naturally, raises the question:
When Should You Use The X-Robots-Tag?
According to Google, “Any directive that can be used in a robots meta tag can also be specified as an X-Robots-Tag.”
While you can set robots.txt-related regulations in the headers of an HTTP response with both the meta robotics tag and X-Robots Tag, there are particular scenarios where you would wish to use the X-Robots-Tag– the two most typical being when:
- You wish to manage how your non-HTML files are being crawled and indexed.
- You wish to serve directives site-wide instead of on a page level.
For example, if you want to obstruct a particular image or video from being crawled– the HTTP response method makes this easy.
The X-Robots-Tag header is likewise useful due to the fact that it permits you to integrate several tags within an HTTP response or use a comma-separated list of directives to specify directives.
Perhaps you do not desire a certain page to be cached and desire it to be not available after a specific date. You can use a combination of “noarchive” and “unavailable_after” tags to advise online search engine bots to follow these instructions.
Essentially, the power of the X-Robots-Tag is that it is a lot more flexible than the meta robots tag.
The advantage of using an X-Robots-Tag with HTTP reactions is that it permits you to use regular expressions to perform crawl instructions on non-HTML, as well as use specifications on a bigger, worldwide level.
To assist you understand the difference in between these regulations, it’s handy to classify them by type. That is, are they crawler regulations or indexer instructions?
Here’s a convenient cheat sheet to discuss:
|Crawler Directives||Indexer Directives|
|Robots.txt– utilizes the user agent, allow, disallow, and sitemap instructions to define where on-site search engine bots are allowed to crawl and not allowed to crawl.||Meta Robotics tag– enables you to define and prevent online search engine from showing particular pages on a website in search results page.
Nofollow– enables you to specify links that should not pass on authority or PageRank.
X-Robots-tag– permits you to control how specified file types are indexed.
Where Do You Put The X-Robots-Tag?
Let’s say you want to block specific file types. A perfect approach would be to add the X-Robots-Tag to an Apache configuration or a.htaccess file.
The X-Robots-Tag can be contributed to a website’s HTTP reactions in an Apache server configuration via.htaccess file.
Real-World Examples And Uses Of The X-Robots-Tag
So that sounds excellent in theory, however what does it appear like in the real world? Let’s take a look.
Let’s say we wanted online search engine not to index.pdf file types. This configuration on Apache servers would look something like the below:
In Nginx, it would appear like the below:
area ~ * . pdf$
Now, let’s take a look at a various circumstance. Let’s state we want to use the X-Robots-Tag to block image files, such as.jpg,. gif,. png, and so on, from being indexed. You might do this with an X-Robots-Tag that would look like the below:
Please note that understanding how these directives work and the effect they have on one another is vital.
For instance, what occurs if both the X-Robots-Tag and a meta robotics tag are located when spider bots find a URL?
If that URL is obstructed from robots.txt, then specific indexing and serving instructions can not be discovered and will not be followed.
If directives are to be followed, then the URLs consisting of those can not be disallowed from crawling.
Check For An X-Robots-Tag
There are a couple of different methods that can be used to check for an X-Robots-Tag on the website.
The simplest way to inspect is to set up a browser extension that will tell you X-Robots-Tag info about the URL.
Screenshot of Robots Exclusion Checker, December 2022
Another plugin you can use to determine whether an X-Robots-Tag is being utilized, for instance, is the Web Developer plugin.
By clicking the plugin in your internet browser and browsing to “View Reaction Headers,” you can see the various HTTP headers being used.
Another approach that can be utilized for scaling in order to identify problems on sites with a million pages is Shouting Frog
. After running a site through Shouting Frog, you can navigate to the “X-Robots-Tag” column.
This will reveal you which sections of the site are utilizing the tag, in addition to which specific regulations.
Screenshot of Shouting Frog Report. X-Robot-Tag, December 2022 Utilizing X-Robots-Tags On Your Site Understanding and controlling how online search engine interact with your website is
the foundation of search engine optimization. And the X-Robots-Tag is a powerful tool you can use to do simply that. Simply understand: It’s not without its dangers. It is really easy to make a mistake
and deindex your whole site. That stated, if you’re reading this piece, you’re most likely not an SEO newbie.
So long as you use it wisely, take your time and inspect your work, you’ll find the X-Robots-Tag to be a helpful addition to your toolbox. More Resources: Included Image: Song_about_summer/ Best SMM Panel