Skip to content
Urlzee

How Link Previews Work in Messaging Apps

By Urlzee Team · Published · 6 min read

A link preview is the small card with a title, description and image that appears when you paste a link into a chat. The app, or a server it uses, fetches the page in the background, reads a few metadata tags from the HTML, and builds the card from them before anyone has tapped the link.

Where does the preview's title and image come from?

Mostly from Open Graph tags. Open Graph is a simple convention, originally from Facebook, for describing a page to other services. The tags sit in the <head> of the page:

<meta property="og:title" content="Autumn Menu | Harbour Kitchen" />
<meta property="og:description" content="Seasonal dishes, served from 12 until 9." />
<meta property="og:image" content="https://example.com/images/autumn-menu.jpg" />
<meta property="og:url" content="https://example.com/menu" />

Each one maps to part of the card: og:title is the bold headline, og:description the smaller text, og:image the thumbnail and og:url the address the page considers its own. The full list is documented at ogp.me.

When Open Graph tags are missing, apps fall back on what they can find: the page's <title> element, its meta description, and sometimes the first large image. X (formerly Twitter) has its own twitter:card family of tags and falls back to Open Graph for most fields.

Who fetches the page: your phone or a server?

It depends on the app, and the two approaches behave quite differently.

ApproachHow it worksWhat the website sees
Sender-sideThe sender's device fetches the page while the message is being typed, then sends the finished preview along with the messageA request from the sender's own IP address
Server-sideThe app's servers fetch the page after the link is posted and distribute the preview to everyone in the conversationA request from the app company's servers, identified by a crawler user agent

End-to-end encrypted messengers tend to build previews on the sender's side, because their servers cannot read the message to find the link. WhatsApp and iMessage work this way. Workplace and community platforms such as Slack and Discord fetch from their own servers, and so do social networks when you post a link. Implementations change over time, so treat this as the general pattern and not a guarantee for any particular app version.

Server-side crawlers usually announce themselves in the User-Agent header with names such as facebookexternalhit, Slackbot-LinkExpanding, Discordbot, Twitterbot or TelegramBot.

A short link has no content of its own. It answers with a redirect, and the preview fetcher follows it like a browser would. With a Urlzee link, that redirect is an HTTP 302 pointing at your destination, and the fetcher then reads the Open Graph tags on the destination page.

So the preview for a short link is the preview of the page behind it. If the card looks wrong, the fix belongs on the landing page, not on the short link. A quick way to confirm the chain is to run the short link through a link checker, which shows each hop and the final page title.

One practical consequence: if you change where a short link points, apps that cached the old preview may keep showing it for a while.

Work through these in order. Most preview problems are one of the first three.

  1. No Open Graph tags. View the page source and search for og:title. If the tags are absent, add them.
  2. Tags added by JavaScript. Most preview fetchers read the raw HTML and do not run scripts. Tags need to be in the HTML the server sends.
  3. Image problems. The og:image address must be absolute (starting with https://), publicly reachable and a sensible file size. Very large images are often skipped.
  4. The page blocks bots. Firewalls and bot protection can reject preview crawlers. Check whether your security settings allow known crawler user agents.
  5. Login or consent walls. If the fetcher receives a login page, that is what gets previewed.
  6. Too many redirects or a slow response. Fetchers give up quickly.
  7. A stale cache. Apps store previews. After fixing the tags, some platforms offer a debugging tool that re-fetches the page; otherwise wait, or share a URL with a harmless extra query parameter to force a fresh fetch.

Technically, yes: the fetch is a real HTTP request to the link, and a naive counter will add one for it. In a group chat, or on a platform where several services scan links, a single share can produce several requests before any person has opened anything.

This is one of the main reasons click numbers differ between tools. Analytics that recognise crawler user agents can separate these requests from human visits. Urlzee flags known bots and preview crawlers and leaves them out of your totals in link analytics. The broader picture, including security scanners that open links in emails, is covered in bot traffic in link analytics.

Previews involve a request you did not explicitly make, which has small privacy consequences.

With sender-side previews, your device contacts the website as soon as you paste the link, before you press send. The site's server sees your IP address and a rough idea of your device, just as it would if you had visited. With server-side previews, the site sees the app's servers instead, but the app's operator learns which link was shared.

Recipients are generally not exposed by a preview that was generated elsewhere; their device displays the card it was given. Their own request to the site happens only when they tap.

If this matters to you, several messaging apps let you switch link previews off in their privacy settings. For what happens once someone does tap, see tracking links and privacy.

Only partly. Every part of the card is supplied by the page itself. Anyone can put og:title "Your Bank: Secure Login" and a copied logo on a page they control, and the preview will display it faithfully.

The most reliable part of a preview is the domain line that many apps print beneath the title, because the app adds that itself. Read it. If the card says one company and the domain says something else, believe the domain.

Short links complicate this, since apps vary in whether they show the short domain or the final one. When the destination is not clear, paste the link into a URL expander to see the final address without opening it. A missing preview is not evidence of danger, and a polished one is not evidence of safety; the checks in how to check if a link is safe apply either way.

If you share links for work, a good preview is worth ten minutes of setup.

  • Add og:title, og:description, og:image and og:url to every page you expect people to share.
  • Keep titles short enough not to be cut off, and write the description as a single clear sentence.
  • Use a landscape image; 1200 by 630 pixels is the size most commonly recommended for large cards.
  • Serve the tags in the initial HTML over HTTPS.
  • Test by sending the link to yourself in the apps your audience uses, since each one crops and caches differently.

Do this before you shorten the link and distribute it, so that the first fetch each app caches is the one you want.

Frequently asked questions

How do messaging apps create link previews?
The app, or the service behind it, requests the page at the link and reads metadata from its HTML, mainly Open Graph tags such as og:title, og:description and og:image. It uses those to draw the title, summary and thumbnail in the chat.
Why is my link preview not showing?
Common causes are missing Open Graph tags, an image that is too large or blocked, a page that requires login, a site that blocks automated requests, or a cached older version of the preview held by the app.
Does a link preview count as a click?
The preview fetch is a real request to the link, so basic counters can record it as a click. Analytics tools that filter bots, including Urlzee, recognise preview crawlers and leave them out of click totals.
Can a link preview be trusted?
Not on its own. The title and image come from whatever the page claims about itself, so a fake page can show a real brand's name and logo. Check the domain shown under the preview, and expand short links before opening them.