No Preview Card Showing on Mastodon

Why your link shows as plain text with no card below the status

Missing og:title

Mastodon requires at least a title (from og:title or <title>) or an oEmbed HTML embed to generate a card. Without one, the status shows a bare URL.

<meta property="og:title" content="Your Page Title">

Media attachments suppress cards

Mastodon shows either attached media or a link card, never both. If a user uploads an image, video, audio, or a poll alongside your URL, no preview card appears. Nothing you can do about this from your end.

JavaScript-rendered tags

Mastodon fetches raw HTML and parses it with Nokogiri, with no JS execution. If your OG tags are injected by a client-side framework, Mastodon sees an empty <head>.

Verify:

curl -A "Mastodon/4.3.0 (http.rb/5.2.0; +https://mastodon.social/) Bot" https://yoursite.com/page

If og:title isn’t in the response, you need to render tags server-side.

Diagnosis

  1. View page source and confirm og:title or <title> is in the raw HTML
  2. curl the URL and verify tags aren’t being injected by JavaScript
  3. Confirm a 200 OK response with text/html content type
  4. If your page is close to 1 MB, make sure meta tags aren’t near the bottom of <head> (Mastodon truncates large responses)
  5. Check that og:image points to a file under 8 MB
  6. Ask the user if they attached media to the status (cards are suppressed when media is present)
  7. Check redirect count: Mastodon gives up after 3 hops

Server timeouts

Mastodon’s timeouts are strict: 5 seconds to connect, 10 seconds to read, 30 seconds total. If many instances are fetching your page simultaneously (the fediverse hug of death), your server may not respond in time, and those instances get no card.