Search engine optimization, in its many standard sense, relies upon one thing above all others: Search engine spiders crawling and indexing your website.
But almost every website is going to have pages that you don’t want to include in this expedition.
In a best-case situation, these are not doing anything to drive traffic to your website actively, and in a worst-case, they might be diverting traffic from more important pages.
Thankfully, Google allows webmasters to inform search engine bots what pages and material to crawl and what to overlook. There are several ways to do this, the most common being using a robots.txt file or the meta robotics tag.
We have an exceptional and detailed description of the ins and outs of robots.txt, which you need to definitely check out.
But in top-level terms, it’s a plain text file that lives in your site’s root and follows the Robots Exclusion Protocol (REPRESENTATIVE).
Robots.txt provides crawlers with directions about the website as an entire, while meta robots tags include instructions for particular pages.
Some meta robotics tags you may employ consist of index, which informs online search engine 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 page; follow, which instructs 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 robots tags are useful tools to keep in your tool kit, but there’s also another method to advise 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 manage how your websites are crawled and indexed by spiders. As part of the HTTP header action to a URL, it controls indexing for an entire page, as well as the particular elements on that page.
And whereas utilizing meta robots tags is fairly straightforward, 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 regulation that can be utilized in a robotics meta tag can also be defined as an X-Robots-Tag.”
While you can set robots.txt-related directives in the headers of an HTTP action with both the meta robots tag and X-Robots Tag, there are certain circumstances where you would wish to use the X-Robots-Tag– the 2 most typical being when:
- You want to control how your non-HTML files are being crawled and indexed.
- You want to serve directives site-wide rather of on a page level.
For instance, if you want to obstruct a particular image or video from being crawled– the HTTP reaction approach makes this simple.
The X-Robots-Tag header is likewise helpful since it allows you to combine numerous tags within an HTTP reaction or utilize a comma-separated list of regulations to specify instructions.
Maybe you don’t want a particular page to be cached and want it to be not available after a certain date. You can utilize a combination of “noarchive” and “unavailable_after” tags to instruct 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 benefit of utilizing an X-Robots-Tag with HTTP responses is that it permits you to utilize routine expressions to execute crawl instructions on non-HTML, along with use specifications on a bigger, worldwide level.
To help you understand the distinction between these directives, it’s handy to classify them by type. That is, are they crawler directives or indexer instructions?
Here’s a convenient cheat sheet to explain:
|Crawler Directives||Indexer Directives|
|Robots.txt– uses the user agent, enable, prohibit, and sitemap instructions to define where on-site online search engine bots are enabled to crawl and not permitted to crawl.||Meta Robotics tag– enables you to define and avoid online search engine from showing specific pages on a website in search engine result.
Nofollow– enables you to define links that should not hand down authority or PageRank.
X-Robots-tag– allows you to manage how defined file types are indexed.
Where Do You Put The X-Robots-Tag?
Let’s state you wish to obstruct specific file types. An ideal method would be to include the X-Robots-Tag to an Apache setup or a.htaccess file.
The X-Robots-Tag can be added to a site’s HTTP actions in an Apache server setup via.htaccess file.
Real-World Examples And Utilizes Of The X-Robots-Tag
So that sounds excellent in theory, however what does it look like in the real life? Let’s have a look.
Let’s say we desired search engines 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:
place ~ * . pdf$ add_header X-Robots-Tag “noindex, nofollow”;
Now, let’s look at a various circumstance. Let’s state we wish to utilize the X-Robots-Tag to obstruct image files, such as.jpg,. gif,. png, etc, from being indexed. You could do this with an X-Robots-Tag that would appear like the below:
Please note that comprehending how these regulations work and the impact they have on one another is vital.
For example, what happens if both the X-Robots-Tag and a meta robots tag lie when crawler bots find a URL?
If that URL is blocked from robots.txt, then certain indexing and serving regulations can not be discovered and will not be followed.
If regulations are to be followed, then the URLs consisting of those can not be prohibited from crawling.
Check For An X-Robots-Tag
There are a few various techniques that can be used to look for an X-Robots-Tag on the website.
The easiest way to examine is to install an internet browser extension that will inform you X-Robots-Tag details about the URL.
Screenshot of Robots Exclusion Checker, December 2022
Another plugin you can use to figure out whether an X-Robots-Tag is being utilized, for example, is the Web Developer plugin.
By clicking the plugin in your internet browser and navigating to “View Reaction Headers,” you can see the numerous HTTP headers being utilized.
Another method that can be used for scaling in order to identify issues on websites with a million pages is Shrieking Frog
. After running a website through Yelling Frog, you can browse to the “X-Robots-Tag” column.
This will show you which areas of the site are utilizing the tag, in addition to which specific instructions.
Screenshot of Screaming Frog Report. X-Robot-Tag, December 2022 Utilizing X-Robots-Tags On Your Website Understanding and controlling how search engines interact with your site is
the cornerstone of seo. And the X-Robots-Tag is an effective tool you can use to do just that. Simply be aware: It’s not without its dangers. It is really simple to make a mistake
and deindex your entire site. That said, if you’re reading this piece, you’re most likely not an SEO newbie.
So long as you utilize it carefully, take your time and examine your work, you’ll find the X-Robots-Tag to be an useful addition to your arsenal. More Resources: Included Image: Song_about_summer/ Best SMM Panel