Glossary
Link unfurling
Link unfurling is when an app fetches a pasted URL and expands it into a preview card showing the page’s title, description and image.
Link unfurling is what a chat app, collaboration tool or social platform does when it turns a pasted URL into a preview card, showing the page’s title, description, image and site name beneath the message. The app’s server fetches the URL, reads the page’s Open Graph, Twitter Cards and standard meta tags, and renders what it finds. Slack, Microsoft Teams, Discord, WhatsApp, iMessage and LinkedIn all unfurl links, and the term itself comes from Slack, where the preview appears to unfold out of the bare link.
Unfurling is the action; the card it produces is a link preview. The two words are often used interchangeably, but the distinction matters when building one, because most of the engineering sits in the unfurl step: fetching safely, parsing reliably, caching sensibly and deciding what to show when a page gives you very little to work with.
How link unfurling works
The process is the same in most products. A user posts a message containing a URL. The app detects the URL, usually with a pattern match on the message text, and sends it to an unfurling service. That service makes an HTTP request to the page, often with its own user agent such as Slackbot-LinkExpanding or Discordbot, so site owners can recognise and allow it. It follows any redirect chain to the final page, downloads the HTML and parses the head for preview metadata.
The parser looks for tags in a rough order of preference. Open Graph properties such as og:title, og:description and og:image come first on most platforms. Twitter Card tags fill gaps or take priority on some apps. If neither exists, the unfurler falls back to the HTML title element, the meta description and sometimes the first large image on the page. The favicon and the site name complete the card. Some platforms also check for an oEmbed endpoint, which lets a YouTube or Spotify link become a playable embed instead of a static card.
The result is cached. A popular URL might be posted thousands of times a day, and fetching it each time would be slow for users and unkind to the site being previewed, so unfurlers store the parsed metadata for hours or days. The cache is why a corrected og:image can take a while to show up in an app that has already previewed the old version.
Where the fetch happens
Platforms differ in who fetches the page, and the choice has privacy consequences.
Approach | Who fetches the page | Examples | Trade-off |
|---|---|---|---|
Server-side | The platform’s servers | Slack, Teams, Discord, LinkedIn | The recipient’s IP address is hidden, but the platform sees every URL shared |
Sender’s device | The sender’s app, before sending | iMessage, Signal, WhatsApp | The platform sees less, but the sender’s device makes the request |
Recipient’s device | Each recipient’s app, on receipt | Rare in current apps | Every reader’s IP address is exposed to the linked site |
Server-side unfurling is the most common in workplace tools. It hides readers from the linked site and lets the platform cache one result for everyone, at the cost of the platform fetching every link that passes through it. End-to-end encrypted messengers prefer sender-side generation so that their servers never see the URL. Security researchers Talal Haj Bakry and Tommy Mysk published a widely cited 2020 study of chat apps that found previews generated on the recipient’s device could leak IP addresses, and that some server-side unfurlers downloaded very large files or kept copies of private links. Most of the apps named have since changed their behaviour, but the study is still a useful checklist for anyone building an unfurler.
Custom unfurls in Slack and Teams
Workplace platforms let apps take over unfurling for their own domains. In Slack, an app registers the domains it handles, subscribes to the link_shared event and responds by calling the chat.unfurl method with its own attachment or Block Kit layout. That is how a link to a ticket, a design file or a dashboard can unfurl with live status, assignee and a thumbnail that a public crawler could never see, because the app fetches the data through an authenticated API instead of reading public tags.
Microsoft Teams offers the same through message extensions: an app declares the domains it handles, receives a query when a matching link is pasted and returns an Adaptive Card. In both cases the platform falls back to its standard unfurler for every domain that no installed app has claimed. This split is worth knowing when you build internal tools: public pages unfurl from their tags, while private resources need an app.
Why unfurls fail
Most broken previews trace back to a handful of causes. Pages built as single-page applications often add their meta tags with client-side JavaScript after load, and many unfurlers read only the HTML the server sends, so the tags never appear. JavaScript rendering in a headless browser solves this on the unfurler side, and server-side rendering solves it on the site side. Images fail when the URL is relative, sits behind authentication, is served with the wrong content type or is too large for the platform’s limits.
Sites also block unfurlers without meaning to. A robots.txt rule written for scrapers, a web application firewall or a bot challenge can stop a preview crawler at the door. Login walls and paywalls return the login page’s metadata, so the card shows “Sign in” with a generic logo. Slow servers time out, because unfurlers wait only a few seconds before giving up. And as pages move or disappear, link rot leaves cached cards pointing at content that no longer exists.
Some failures are deliberate. A site can publish tags that misdescribe its own content, from clickbait titles to images unrelated to the page, which is the subject of 10 websites that lie in their Open Graph tags.
Security considerations for unfurlers
An unfurler is a service that fetches arbitrary URLs supplied by users, which makes it a classic target. The main risk is server-side request forgery: a user posts a link to an internal address such as a cloud metadata endpoint or a private IP range, and the unfurler fetches it from inside your network. A safe unfurler resolves the hostname, rejects private and link-local addresses, re-checks after every redirect and runs in an isolated network segment.
The other risks are resource and content related. Cap the response size and the number of bytes read before parsing, so a link to a multi-gigabyte file does not exhaust memory. Time out slow responses. Check image URLs with the same rules as page URLs, since a preview image is a second fetch. Strip or sandbox any HTML that comes back from oEmbed providers. And decide whether to preview links to malware or adult content at all; many platforms check URLs against blocklists before showing a card, and some uploaded media goes through malware scanning as well.
Unfurling can also trigger side effects on the linked site. One-time links, such as password resets, magic sign-in links and single-use download URLs, may be consumed by the unfurler’s request before the intended recipient clicks. Well-designed sites require a second step, such as a button press, before acting on a one-time token, and unfurlers should send only GET requests and never follow forms.
Building unfurling into your own product
If your product shows user-generated links, such as a chat feature, a comments thread, a CRM timeline or an agent that cites sources, you will need unfurling. The core loop is short: detect URLs, fetch, parse, store and render. Production quality takes more work: JavaScript rendering for modern sites, provider-specific handling for YouTube, X and Spotify, image dimension checks, a cache with sensible expiry, SSRF protection and rate limiting so one busy channel cannot overwhelm a small site.
A worked example: a support team adds a sidebar to its helpdesk that shows previews of every link a customer pastes into a ticket. The first version uses a simple HTTP fetch and an HTML parser. It works for news sites but returns blank cards for the customer’s own React app, because the tags are injected client-side. Switching to a preview service that renders JavaScript fixes those. Next, a customer pastes a link to a 2 GB video file and the worker runs out of memory, so the team adds a response size cap and a content-type check before downloading. Finally, previews for the same ten documentation pages are being fetched hundreds of times a day, so the team caches results for 24 hours keyed on the canonical URL. The same data then feeds the customer support agent, which can cite a linked page by title instead of by raw URL.
For agents, unfurled metadata is a light alternative to full web scraping. A title, description and image are often enough to label a source, group bookmarks or decide whether a page is worth reading in full. The structured result is a form of URL metadata that can be stored next to a document and searched later.
Where Exabase fits
The Exabase Link Preview API is an unfurling service you can call from your own product. A request to GET /v2/link with a URL returns the url, title, description, siteName, a detected type such as link or spotify, an image and a favicon (each with a pre-signed URL, width and height) and provider-specific metadata; for Spotify links that includes the track, artist, audio stream URL and embed player URL. It returns 404 when no preview data can be fetched.
Several of the hard parts above are handled for you. Pages are rendered with JavaScript before parsing, and if Open Graph tags are missing the API falls back to the page title, meta description and first usable image. Redirects are followed, and the response carries the final URL along with the canonical URL. Image dimensions, file size and MIME type are included, so you do not need a second fetch to lay out the card. Results are cached for up to 24 hours, an optional safe-content filter blocks malware and adult URLs, and providers including YouTube, Amazon, Twitter, Airbnb, Vimeo, SoundCloud and Giphy return richer data. Only public pages are supported: pages behind a login or paywall return the login page’s metadata or an error. The first 20,000 previews each month are free, with no card needed to sign up.
The link preview guide, the API reference and the LinkPreview model document the request and response, and why we built a free link preview API explains the background. When a link should be kept, not just previewed, save it as a bookmark in Resources: Exabase fetches the page, stores its title, description, favicon, a screenshot and a reader-mode copy, and indexes the content for Deep Search. For full page content as text chunks, use Extract. To compare preview services, see the best link preview APIs, Exabase vs Microlink and Exabase vs Iframely.
Frequently asked questions
What is link unfurling?
Link unfurling is the process of turning a pasted URL into a preview card by fetching the page and reading its title, description, image and site name from its metadata.
What is the difference between link unfurling and a link preview?
Unfurling is the fetch-and-parse step; the link preview is the card it produces. Most people use the terms interchangeably.
How do I stop Slack from unfurling a link?
Remove the preview from your message after posting it, using the close control on the preview. Slack’s preferences and workspace settings can also limit previews, depending on your plan and admin permissions.
Why does my link not unfurl properly?
Usually the meta tags are added by client-side JavaScript, the image URL is relative or blocked, the unfurler is blocked by robots.txt or a firewall, or the platform is showing a cached version of an earlier fetch.
Is link unfurling a security risk?
It can be. An unfurler fetches user-supplied URLs, so it must guard against server-side request forgery, huge downloads and one-time links being consumed by the preview request.
Which tags do unfurlers read?
Most read Open Graph first, then Twitter Cards, then the HTML title, meta description and favicon. Some also use oEmbed for embeddable media.
Can I add link unfurling to my own app?
Yes. You can build a fetcher and parser yourself or call a preview service. The Exabase Link Preview API returns unfurl data from one GET request, with 20,000 free previews a month.
Related pages: link preview, Open Graph, Twitter Cards, oEmbed, og:image, URL metadata, redirect chain, free Link Preview API, best link preview APIs, Microlink vs Iframely, Microlink alternatives, Microlink pricing