A valid preview needs both correct markup and a fetchable image
Provide stable absolute URLs, content-specific text, and a representative image that anonymous crawlers can retrieve. Keep Open Graph and X values aligned and remember that platforms may cache an older version after the page changes.
- Set Open Graph title, type, URL, and image for important shareable pages.
- Add X card metadata or deliberately rely on supported Open Graph fallbacks.
- Return the social image with 200, a correct image Content-Type, and useful dimensions.
- Expect platform caches and layouts to differ from the report preview.
Core metadata and fallbacks
- og:title and description Describe the specific shared page, not just the site or a generic campaign.
- og:url Use the stable canonical public URL so engagement is not split across variants.
- og:image Use an absolute HTTPS URL for a representative image; provide alt text where supported.
- twitter:card Choose a supported card presentation and provide X-specific values when the Open Graph fallback is insufficient.
Why an image tag can still fail
The image request may redirect, time out, return HTML, require cookies, block crawler user agents, or exceed a platform’s limits. A browser preview from an authenticated session does not prove that a social crawler can fetch it.
Use a stable public URL, correct Content-Type, adequate resolution, and an aspect ratio suitable for the intended card. Avoid short-lived signed URLs for evergreen pages.
Diagnose stale and inconsistent cards
First inspect the final server HTML, then request every metadata URL anonymously. Resolve duplicate tags and conflicts between server markup and JavaScript-rendered values.
After publishing, use the platform’s official validation or card inspection workflow where available to refresh its cache. The report preview remains approximate because Facebook, X, Discord, and messaging apps apply different crops and fallbacks.
Ship a complete sharing contract
- 01Set page-specific Open Graph title, description, type, URL, and image.
- 02Choose an X card type and verify intentional fallbacks.
- 03Fetch image and page URLs without login, cookies, or JavaScript.
- 04Remove duplicate and contradictory metadata.
- 05Refresh platform caches and inspect several real shares.
Official references
The technical recommendations in this guide are aligned with these primary sources.