Suggest an editImprove this articleRefine the answer for “What does the User-agent directive do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)The **User-agent** directive in the robots.txt file specifies which search bot the set of rules listed below applies to. **Key point:** User-agent is a pointer to the bot for which the following rules in the block are written.Shown above the full answer for quick recall.Answer (EN)ImageThe **User-agent** directive in the **robots.txt** file specifies **which search bot the set of rules listed below belongs to**. In other words, it sets the addressee: exactly who Allow, Disallow, and other directives apply to. You can: - set rules for all bots, using `User-agent: *` - set rules for a specific bot, for example: - `User-agent: Googlebot` - `User-agent: Bingbot` Example: ```javascript User-agent: * Disallow: /tmp/ User-agent: Googlebot Allow: / ``` In this example: - all bots cannot crawl `/tmp/` - Googlebot can crawl the whole site without restrictions Conclusion: **User-agent is a pointer to the bot for which the following rules in the block are written.**For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.