EN ▾
Čeština
Sign inStart free
Home › Guides › Link previewer customization guide

Link previewer customization guide

Published · Updated

A link previewer decides how a shared URL appears across messaging apps, social platforms, and collaboration tools. This guide explains how to configure a link previewer with accurate titles, descriptions, images, metadata, caching, redirects, testing, and debugging so shared links stay reliable and useful.

Understand what creates a link preview

A preview is usually generated from metadata found in the shared page rather than from the visible page design alone. Platforms may inspect the HTML, social tags, canonical URL, image references, response status, redirects, and other signals before creating the card shown to the user.

Because each platform has its own crawler and cache, the same page may not appear identically everywhere. Treat the preview as a separate delivery surface that needs its own metadata, testing, and monitoring instead of assuming the browser page automatically produces a good share card.

Write titles and descriptions for sharing

The preview title should identify the page clearly without being vague or excessively long. It may differ from the browser title when a shorter sharing title communicates the page better. The description should explain the value of the destination in a concise way and avoid filler or text that becomes misleading when separated from the page.

Create metadata from the page's real content. A preview should not promise a feature, price, event, or result that the destination does not provide. When many pages are generated dynamically, define reusable title and description templates while still allowing important pages to override them.

Choose reliable preview images

Preview images should be publicly reachable by the crawler, use a stable URL, return the expected image content type, and have dimensions appropriate for a card. Very small assets, inaccessible storage, expired signed URLs, or redirects that fail for bots can cause the platform to show no image.

Design the image for cropping because different surfaces may use different aspect ratios. Keep important subjects away from extreme edges and avoid putting essential information only in tiny text. If the image changes, use a versioned URL when possible so caches can distinguish the new asset.

Configure social metadata correctly

Social metadata should be rendered in the initial HTML that crawlers receive. Include the relevant title, description, image, URL, and content type fields according to the sharing standards your application supports. Ensure the values are valid absolute URLs where required.

Client-side JavaScript may run too late for some crawlers. If a preview depends on dynamic data, render the metadata on the server or through a delivery layer that returns the correct HTML immediately. Keep metadata consistent with canonical URLs and avoid conflicting tags that give crawlers multiple answers.

Handle redirects and canonical URLs

Redirects can interfere with preview generation when chains are long, status codes are unusual, authentication is required, or the final destination changes metadata unexpectedly. Prefer a short and predictable redirect path from the shared URL to the final public page.

Use canonical URLs consistently so a page has one preferred identity. If campaign parameters or tracking links are shared, decide whether the preview should represent the tracked URL or the canonical destination. Avoid configurations where different variants create conflicting preview data.

Plan for caching and refresh delays

Platforms commonly cache preview results, so changing page metadata may not update the shared card immediately. This can look like a bug even when the new HTML is correct. Plan for cache delays and use official preview refresh or debugging tools when a platform provides them.

Versioning image URLs can help when the image changed but the platform retains an older asset. Do not constantly change URLs only to force refresh, because unstable addresses create their own maintenance problems. Keep a simple record of what changed and when so delayed updates are easier to diagnose.

Test previews across platforms

Testing should cover several real sharing surfaces instead of only inspecting the source code. Check title, description, image, destination URL, cropping, language, redirect behavior, and whether the preview still works from a cold share rather than an already cached thread.

Use a repeatable checklist and a small set of representative pages: homepage, product page, article, dynamic content, localized page, and a page with a custom image. Re-run these tests after changing routing, metadata rendering, CDN behavior, or image delivery.

Debug broken or outdated previews

When a preview is broken, inspect the page response first. Check status code, final URL, redirects, HTML returned to bots, metadata values, image accessibility, robots restrictions, cache headers, and CDN behavior. A problem may be in page rendering, storage, routing, or the external platform cache.

Infera Agent can help inspect metadata, compare page responses, test multiple routes, identify inaccessible images, and assist with code changes when the expected preview is defined. Keep reproduction links and evidence so the fix can be verified later.

Questions

What controls a link preview?

Usually page metadata, title, description, preview image, canonical URL, redirects, crawler access, and the platform's own cache.

Why does an old preview keep appearing?

The sharing platform may have cached an older version. Refresh tools or a legitimately versioned image URL may be needed.

Should preview metadata be generated with JavaScript?

Server-rendered or initial HTML metadata is generally more reliable because some crawlers do not execute client JavaScript fully.

How can Infera Agent help?

It can inspect metadata, compare responses, test routes, identify inaccessible images, and assist with fixes when the expected preview is clear.

Start free Templates

Ready to build your idea?

Start now for free — your first app can be ready in minutes.

Start free