Sign inGet started
Tracking

Twitterbot

View as MarkdownOpen in ChatGPTOpen in Claude
Connect your agent
Add to CursorAdd to VS Code

Twitterbot fetches a link shared on X to build its card, reading twitter tags, then Open Graph. Its user agent, robots.txt, addresses and how long cards stay.

Updated

Twitterbot is the crawler X sends when someone shares a link, to build the link's card. It reads the twitter: tags first (twitter:card, twitter:title and so on) and falls back to the Open Graph ones. X keeps a card for about 7 days.

X has removed its developer pages on cards. What follows is from the last copies of X's own getting started and troubleshooting pages, saved by the Internet Archive in early 2026. We checked them on November 30, 2026.

What does Twitterbot's user agent look like?

X's pages name it Twitterbot/1.0. Match Twitterbot in the user agent.

Does Twitterbot follow robots.txt?

Yes: X said Twitterbot follows robots.txt the way Google's specification reads it. A page Twitterbot isn't allowed to fetch gets no card.

User-agent: Twitterbot
Allow: /

How do you know it's really X?

X listed Twitterbot's networks as 199.16.156.0/22, 199.59.148.0/22 and 192.133.76.0/22, on AS13414. Or look the address up: the name should end in twitter.com or twttr.com and resolve back to the same address.

Does it show up in your analytics?

Not as a visit. Most crawlers read your HTML and never run your analytics tag, so tag-based tools such as Google Analytics 4 don't see them at all. The ones that render pages in a browser can run the tag. nextanalytica recognizes them by their user agent when the hit reaches its edge, stores the hit apart under the bot's name and leaves it out of every report. Your agent still sees how many hits from bots arrived and weren't counted as visits. See Bot traffic.

This command adds nextanalytica to Claude Code:

claude mcp add --transport http nextanalytica https://mcp.nextanalytica.app/mcp

Next steps

Related
  • What the tag collects: Page views, clicks, forms, scroll, errors and page speed, counted without code. What never leaves the page.
  • Add the tag: Put one script line in the head of every page. Where it goes in plain HTML, site builders and each framework.
  • Next.js analytics: Add analytics to Next.js with @nextanalytica/tag: install, events, consent and AI crawlers, counted without cookies until a yes and read by your agent.
  • Next.js custom events: Send custom events from a Next.js app with @nextanalytica/tag: sign-ups, demo requests and conversions your agent reads by channel.
  • Next.js cookie consent: Wire a cookie banner in Next.js to analytics: count without cookies until the answer, and pass the saved answer on every page.
  • Next.js revenue tracking: Record orders in a Next.js app, from the browser or from your server, so revenue ties to the visit, channel and campaign it came from.
Still have questions?
Was this page useful?