Twitterbot
Twitter web crawler for link previews
About this crawler
Twitterbot is a web crawler identified by the regular-expression pattern Twitterbot in the User-Agent request header. It is categorised as social-preview. Use the regex above to detect, log, allow, or block Twitterbot traffic in your web server, CDN edge rules, or robots.txt.
Block-rate · top 25k sites
0.98%
Technical details
- Name
- Twitterbot
- Pattern
Twitterbot- Tags
- social-preview
- Reference
- https://developer.twitter.com/
- Added
- 2014/09/12
- rDNS suffixes
.twitter.com,.twttr.com,.x.com- Instances
- 2 known sample(s)
rDNS verification (FCrDNS)
Verify a request is genuinely Twitterbot with forward-confirmed reverse DNS: the client IP's PTR record must end in one of the suffixes below and a forward A/AAAA lookup of that hostname must return the same IP. UA strings alone are spoofable; FCrDNS is not.
.twitter.com.twttr.com.x.com
Sample User-Agent strings
Twitterbot/0.1
Twitterbot/1.0
Block this crawler
robots.txt — disallow Twitterbot:
User-agent: Twitterbot
Disallow: /
Apache .htaccess — return 403:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} Twitterbot [NC]
RewriteRule .* - [F,L]
Nginx — return 403 inside a server block:
if ($http_user_agent ~* "Twitterbot") {
return 403;
}
← back to all crawlers