Meta robots là gì

What are robots meta tags?

Robots meta directives (sometimes called "meta tags") are pieces of code that provide crawlers instructions for how to lớn crawl or index web page nội dung. Whereas robots.txt tệp tin directives give bots suggestions for how to lớn crawl a website"s pages, robots meta directives provide more firm instructions on how lớn crawl & index a page"s nội dung.

Bạn đang xem: Meta robots là gì

There are two types of robots meta directives: those that are part of the HTML page (like the meta robotstag) and those that the web VPS sends as HTTP headers (such as x-robots-tag). The same parameters (i.e., the crawling or indexing instructions a meta tag provides, such as "noindex" và "nofollow" in the example above) can be used with both meta robots và the x-robots-tag; what differs is how those parameters are communicated to lớn crawlers.

Code sample:

While the general tag is standard, you can also provide directives khổng lồ specific crawlers by replacing the "robots" with the name of a specific user-agent. For example, to lớn target a directive specifically to lớn Googlebot, you’d use the following code:

Want to lớn use more than one directive on a page? As long as they’re targeted to the same "robot" (user-agent), multiple directives can be included in one meta directive – just separate them by commas. Here’s an example:

This tag would tell robots not to index any of the images on a page, follow any of the liên kết, or show a snippet of the page when it appears on a SERP..

If you’re using different meta robots tag directives for different tìm kiếm user-agents, you’ll need khổng lồ use separate tags for each bot.


While the meta robots tag allows you lớn control indexing behavior at the page cấp độ, the x-robots-tag can be included as part of the HTTPhường. header lớn control indexing of a page as a whole, as well as very specific elements of a page.

While you can use the x-robots-tag lớn exexinh tươi all of the same indexation directives as meta robots, the x-robots-tag directive offers significantly more flexibility and functionality that the meta robots tag does not. Specifically, the x-robots permits the use of regular expressions, executing crawl directives on non-HTML files, & applying parameters at a global cấp độ.

Xem thêm: Mua Giống Gà Tre Thuần Chủng, Gà Tre Lai Asil Mỹ Kiểng Đẹp, Giá Rẻ Toàn Quốc


To use the x-robots-tag, you’ll need lớn have access lớn either your website’s header .php, .htaccess, or VPS access tệp tin. From there, add your specific hệ thống configuration’s x-robots-tag markup, including any parameters. This article provides some great examples of what x-robots-tag markup looks lượt thích if you’re using any of these three configurations.

Here are a few use cases for why you might employ the x-robots-tag:

Controlling the indexation of nội dung not written in HTML (like flash or video)

Blocking indexation of a particular element of a page (like an image or video), but not of the entire page itself

Controlling indexation if you don’t have access to lớn a page’s HTML (specifically, khổng lồ the section) or if your site uses a global header that cannot be changed

Adding rules to whether or not a page should be indexed (ex. If a user has commented over đôi mươi times, index their protệp tin page)

SEO best practices with robots meta directives

All meta directives (robots or otherwise) are discovered when a URL is crawled. This means that if a robots.txt file disallows the URL from crawling, any meta directive on a page (either in the HTML or the HTTPhường header) will not be seen và will, effectively, be ignored.

In most cases, using a meta robots tag with parameters "noindex, follow" should be employed as a way to lớn khổng lồ restrict crawling or indexation instead of using robots.txt tệp tin disallows.

It is important khổng lồ note that malicious crawlers are likely to completely ignore meta directives và as such, this protocol does not make a good security mechanism. If you have private information that you don’t want khổng lồ make publicly searchable, choose a more secure approach, such as password protection, lớn keep visitors from viewing confidential pages.

Xem thêm: Cách Luộc Hến Nhanh Mà Không Làm Mất Chất, Mẹo Tách Vỏ Hến Siêu Nhanh Mà Không Làm Mất Chất

You vì chưng not need khổng lồ use both meta robots & the x-robots-tag on the same page – doing so would be redundant.

Improve your technical site health with Pro

Keep tabs on critical crawler issues (& tons of other details) with the help of Pro"s Site Crawl. Take a 30-day miễn phí trial on us and see what you can achieve:

Start my miễn phí trial

Keep learning

Put your skills khổng lồ work Prolets you run crawls, retìm kiếm & report on keyword ranking, & trachồng your site"s SEO performance, including its accessibility, over time. Try it >>

Chuyên mục: Blogs