X Link Preview Not Working: A Raw HTML Troubleshooting Workflow
Debug an X link preview that fails, shows blank content, or differs from your browser by verifying the raw server response, metadata source, robots rules, canonical URL, and image access.
Do not debug the browser DOM first
X builds a link preview from what its crawler can fetch. Browser developer tools often show a finished DOM after scripts, consent widgets, and client-side metadata have run. That is not proof that the initial HTTP response contained the tags. Treat the raw HTML captured by a crawler-style request as the source of truth for a broken preview.
Work through the failure order
Resolve access failures before changing copy or image assets. A perfect tag set cannot work if the crawler gets a 403, an interstitial, or a non-HTML response. Then make the metadata explicit, verify the image independently, and finally investigate caching.
- 1Confirm that the input URL resolves to the expected final URL with an HTTP 200 response.
- 2Check the redirect chain, canonical link, meta robots directive, and robots.txt rule for conflicting signals.
- 3Verify that twitter:card, title, description, and image are present in the raw head HTML; compare each value with its listed source.
- 4Confirm the image returns HTTP 200 with an image MIME type and is not blocked from a Twitterbot-style request.
- 5After every fix is deployed, validate again before waiting on any platform cache refresh.