Search engine optimization, in its a lot of basic sense, relies upon something above all others: Search engine spiders crawling and indexing your site.
But nearly every site is going to have pages that you do not 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 crucial pages.
Luckily, Google enables web designers 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 typical being using a robots.txt file or the meta robotics tag.
We have an outstanding and in-depth explanation of the ins and outs of robots.txt, which you should definitely read.
But in top-level terms, it’s a plain text file that resides in your website’s root and follows the Robots Exemption Protocol (ASSOCIATE).
Robots.txt provides spiders with directions about the website as a whole, while meta robots tags include instructions for particular pages.
Some meta robotics tags you may employ include index, which tells online search engine to add the page to their index; noindex, which informs it not to add a page to the index or include it in search results page; follow, which instructs a search engine to follow the links on a page; nofollow, which informs it not to follow links, and an entire host of others.
Both robots.txt and meta robotics tags are useful tools to keep in your tool kit, however there’s also another method to advise 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 websites are crawled and indexed by spiders. As part of the HTTP header response to a URL, it controls indexing for a whole page, along with the particular components on that page.
And whereas using meta robots tags is relatively simple, the X-Robots-Tag is a bit more complicated.
But this, obviously, raises the concern:
When Should You Utilize The X-Robots-Tag?
According to Google, “Any directive that can be utilized in a robots meta tag can also be specified as an X-Robots-Tag.”
While you can set robots.txt-related directives in the headers of an HTTP reaction with both the meta robots tag and X-Robots Tag, there are specific scenarios where you would wish to utilize the X-Robots-Tag– the two most common being when:
- You wish to manage how your non-HTML files are being crawled and indexed.
- You want to serve directives site-wide instead of on a page level.
For instance, if you wish to obstruct a particular image or video from being crawled– the HTTP action technique makes this easy.
The X-Robots-Tag header is likewise helpful because it permits you to integrate multiple tags within an HTTP reaction or utilize a comma-separated list of regulations to define directives.
Possibly you don’t desire a certain page to be cached and desire it to be not available after a particular date. You can use a combination of “noarchive” and “unavailable_after” tags to instruct online search engine bots to follow these directions.
Basically, 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 enables you to use routine expressions to carry out crawl regulations on non-HTML, as well as apply criteria on a bigger, worldwide level.
To help you understand the difference in between these instructions, it’s valuable to categorize them by type. That is, are they crawler directives or indexer regulations?
Here’s an useful cheat sheet to describe:
|Spider Directives||Indexer Directives|
|Robots.txt– uses the user agent, allow, prohibit, and sitemap instructions to define where on-site online search engine bots are allowed to crawl and not enabled to crawl.||Meta Robotics tag– allows you to define and prevent online search engine from showing particular pages on a website in search engine result.
Nofollow– permits you to specify links that need to not hand down authority or PageRank.
X-Robots-tag– permits you to manage how specified file types are indexed.
Where Do You Put The X-Robots-Tag?
Let’s state you want to obstruct specific file types. An ideal 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 actions in an Apache server setup via.htaccess file.
Real-World Examples And Uses Of The X-Robots-Tag
So that sounds fantastic in theory, but 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 look like the below:
location ~ *. pdf$
Now, let’s take a look at a various scenario. Let’s say we wish to utilize the X-Robots-Tag to block 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 understanding how these regulations work and the effect they have on one another is crucial.
For example, what occurs if both the X-Robots-Tag and a meta robotics tag lie when spider bots find a URL?
If that URL is obstructed from robots.txt, then specific indexing and serving regulations can not be discovered and will not be followed.
If directives are to be followed, then the URLs containing those can not be disallowed from crawling.
Check For An X-Robots-Tag
There are a couple of various techniques that can be used to check for an X-Robots-Tag on the site.
The most convenient way to examine is to set up an internet browser extension that will tell you X-Robots-Tag info about the URL.
Screenshot of Robots Exemption Checker, December 2022
Another plugin you can utilize to determine whether an X-Robots-Tag is being used, for instance, is the Web Designer plugin.
By clicking on the plugin in your browser and navigating to “View Reaction Headers,” you can see the different HTTP headers being used.
Another method that can be used for scaling in order to pinpoint concerns on sites with a million pages is Screaming Frog
. After running a site through Yelling Frog, you can browse to the “X-Robots-Tag” column.
This will show you which sections of the website are using the tag, along with which specific regulations.
Screenshot of Shrieking Frog Report. X-Robot-Tag, December 2022 Utilizing X-Robots-Tags On Your Website Understanding and managing how search engines connect with your site is
the foundation of search engine optimization. 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 extremely easy to make a mistake
and deindex your entire website. That stated, if you read this piece, you’re most likely not an SEO beginner.
So long as you use it wisely, take your time and examine your work, you’ll find the X-Robots-Tag to be a beneficial addition to your toolbox. More Resources: Featured Image: Song_about_summer/ SMM Panel