WhatsApp Link Preview User Agent and Open Graph Tags

WhatsApp fetches a page to build a link preview. User-agent format, the Open Graph tags it reads, image limits, and how to block it.

4 min read713 words· Updated October 22, 2026

WhatsApp gets a web page when a user puts its link in a message. It uses the Open Graph tags of the page to make a link preview. Meta documents this request only for link previews, not for search or AI training. If you want a preview card for your pages, add the Open Graph tags near the top of the HTML. Do not block user agents that start with WhatsApp/.

What the WhatsApp request does

Meta’s WhatsApp link preview documentation says that WhatsApp gets the page with an HTTP GET request. WhatsApp then reads the Open Graph tags and shows a preview card with the link. Meta says that WhatsApp shows link previews for links sent in a chat and for links shared in a status.

A 2020 study by Talal Haj Bakry and Tommy Mysk found that the WhatsApp app of the sender downloads the link to make the preview. This means that the request comes from the device of the sender, not from a Meta server. The study also says that your server then sees the IP address of the sender.

User-agent string

Meta gives this format for the User-Agent header:

WhatsApp/2.x.x.x A|I|N

The last letter shows the platform: A is Android, I is iOS and N is web. Meta gives these examples:

WhatsApp/2.22.20.72 A
WhatsApp/2.2236.3 N

The request also has an Accept-Language header. Meta says that it is set to the language that the recipient selected, if any. You can use the user agent to identify these requests and send the correct tags.

Open Graph tags that WhatsApp reads

Meta lists four tags. Put them in the <head> of the page, and do not leave them empty.

Tag What Meta asks for
og:title The title of the content, without branding. It shows in bold, on two lines at most.
og:description A short description. About 80 characters is enough.
og:url The canonical URL, with no session variables, user parameters or counters.
og:image An absolute URL of the thumbnail image.
<head>
  <meta property="og:title" content="Page title" />
  <meta property="og:description" content="One short sentence about the page." />
  <meta property="og:url" content="https://example.com/page/" />
  <meta property="og:image" content="https://example.com/images/preview.jpg" />
</head>

Meta gives these limits:

  • The <head> with the tags must be in the first 300KB of the HTML. The full page can be larger.
  • The image must be smaller than 600KB.
  • The image must be at least 300 pixels wide.
  • The ratio of width to height must be 4:1 or less.

Meta says that WhatsApp tries to show a preview when some rules are not met. For example, it can use other HTML tags or show a small preview. Meta does not promise this. The guides to Open Graph meta tags and og:image give more detail on these tags.

  1. Write a WhatsApp message that contains your link. Do not send it.
  2. Wait 10 seconds.
  3. If no preview shows above the message box, make sure that the page meets the rules above.

robots.txt and verification

Meta’s WhatsApp documentation does not mention robots.txt. The Meta web crawlers page does not list WhatsApp, and we found no Meta list of IP addresses for these requests. If the device of the sender makes the request, as the Mysk study found, the IP address belongs to the network of that user. For this reason, a reverse DNS check or an IP list cannot prove that a request came from WhatsApp.

If you do not want WhatsApp to show previews of your pages, block requests whose User-Agent header starts with WhatsApp/. Do this on your web server, CDN or firewall. This example is for nginx:

if ($http_user_agent ~* "^WhatsApp/") {
    return 403;
}

Users can still send and open your links. WhatsApp cannot read your tags, so it cannot make a preview card from your page.

Facebook, Instagram and Messenger use a different crawler for link previews. Meta calls it facebookexternalhit. Meta uses other crawlers for AI: the meta-externalagent guide covers the crawler that Meta uses to train AI models and to index content.

Markdown version
↧
Loading PDF…