By Usama Farooq · Published 16 Apr 2026 · Updated 28 Nov 2026

OG and Twitter Card Tags: Fixing Share Previews

TL;DR — the short answer

Broken share previews are fixed with Open Graph tags (og:title, og:description, og:image, og:url) plus Twitter Card tags — pasted into your page <head> with absolute URLs. Generate them in seconds with ToolsOfWeb’s OG/Twitter Card Tag Generator. If previews still show old content, it is platform caching — wait or force a refresh.

If a page looks wrong when shared — missing image, wrong title, or an old description — you usually need Open Graph tags and Twitter Card tags. These tags control the preview shown on platforms like Facebook, LinkedIn, Slack, Discord, and X/Twitter. This guide explains the core tags, the most common mistakes, and a quick copy-paste workflow using a generator.

The long-tail problems this solves include: “Open Graph image not showing”, “Twitter card not working”, “wrong title when sharing link”, and “share preview not updating”. Most of the time, the fix is a consistent canonical URL plus the right OG/Twitter tags in the HTML response.

What are Open Graph (OG) tags?

Open Graph meta tags are HTML tags used by social platforms to understand your page content and generate a rich preview. The typical preview includes a title, description, and image. Without OG tags, platforms guess — and the guess is often wrong.

OG tags are not “only for Facebook”. Many link preview systems use the same OG data, even if they show it in different layouts. That’s why good OG tags improve previews across multiple platforms.

What are Twitter Card tags?

Twitter Cards do the same job for X/Twitter: they define the title/description/image for the shared URL. The most common card type is summary_large_image, which displays a big image preview.

Even if you don’t actively post on X/Twitter, adding Twitter Card tags is still useful because some tools and clients read them as a fallback.

Generate OG tags + Twitter tags (copy/paste)

The fastest workflow is to generate tags from your title/description/image and paste them into your page’s <head>. Use ToolsOfWeb’s Open Graph / Twitter Card Tag Generator to produce the common OG + Twitter tags in seconds.

If you’re using Next.js, you can also implement these tags through the Metadata API. The key requirement is that the tags must appear in the HTML that the crawler sees (not only after client-side JavaScript runs).

Step-by-step: fix a broken share preview

  1. Pick the exact URL you want to share (canonical URL).
  2. Write a clear title and a concise description that matches the page.
  3. Choose a strong preview image (readable text, high contrast).
  4. Generate tags and paste them into the page <head>.
  5. Re-share and give platforms time to refresh cached previews.

Minimal tag set (what you actually need)

If you only add a few tags, start with these. They cover the majority of preview issues:

  • og:title and og:description (clear, human-friendly)
  • og:url (your canonical URL)
  • og:image (a strong preview image)
  • twitter:card (usually summary_large_image)
  • twitter:title, twitter:description, twitter:image

If you want to be extra thorough, include og:image:alt and twitter:image:alt. They improve accessibility and help explain your preview image.

Canonical URL matters (avoid duplicates)

A frequent long-tail issue is: “share preview shows the wrong page.” That often happens when you have multiple URL variants (http vs https, www vs non-www, trailing slash differences). Keep your canonical URL consistent. If you want a full set of SEO tags (title, description, robots, canonical), use the Meta Tag Generator and then add your OG/Twitter preview tags.

For a deeper explanation of titles, descriptions, canonicals, and Open Graph, read: Meta Tag Generator (Title, Description, Open Graph) – Step-by-Step.

Title and description tips (CTR + clarity)

Social previews behave like mini-ads for your page. Keep titles unique and specific, and keep descriptions short enough to be readable without truncation. Avoid keyword stuffing. If your preview looks “spammy”, it can reduce clicks even if your content is good.

  • Title: clear intent, no duplication, brand at the end if needed.
  • Description: 1–2 sentences, explain what the reader gets.
  • Consistency: OG and Twitter text should match the page headline.

Best Open Graph image practices (long-tail SEO)

For “what size should og:image be?”, a common recommendation is 1200×630. More important than the exact size is readability: use high contrast, large text, and keep critical content away from the edges. Always host the image at a stable URL and ensure it’s publicly accessible.

If your OG image files are too large, compress them using the Image Compressor so previews load quickly.

Avoid images behind login, blocked by robots, or served from unstable URLs. If a crawler can’t fetch the image, your preview will be missing or inconsistent.

Why previews don’t update (cache problems)

Even after you fix tags, platforms may show an old preview because they cache results. If you update OG tags and still see old content, wait a bit and try sharing again. Some platforms also provide “debugger” tools to force refresh — but even without that, consistent tags and a stable canonical URL reduce preview drift over time.

Tip: if you change the image often, you can use a versioned image URL (for example, include a build hash in the filename) so platforms fetch the new asset instead of reusing a cached file.

Common issues checklist (quick debugging)

  • Relative URLs: use absolute URLs for og:image and canonical.
  • Redirect chains: too many redirects can cause crawlers to fail.
  • Wrong canonical: canonical points to a different page or variant.
  • Image blocked: robots rules, auth, or hotlink protection blocks the image.
  • Client-only tags: tags added after JS runs won’t be seen by many crawlers.

Internal linking and structured data

If you’re already improving previews, it’s a good time to strengthen on-site SEO too: use internal links between related pages and include structured data where it fits. For example, ToolsOfWeb blog pages use JSON-LD. If you’re drafting schema, format it safely with the JSON Formatter.

If you’re building landing pages, small design details also matter. Pair a clean preview image with a modern UI using the Box Shadow Generator (CSS) and CSS Gradient Generator.

Conclusion

Open Graph tags and Twitter Card tags are the fastest way to fix broken social share previews. Start with a consistent canonical URL, a strong preview image, and clear title/description text. For speed, generate tags with the OG/Twitter tag generator and paste them into your page head.

Next read: Meta Tag Generator best practices.

Platform quirks worth knowing

The same tags render differently everywhere. A few platform-specific behaviors that surprise people:

  • LinkedIn: caches previews for about 7 days and ignores query-string cache-busters on the URL itself — change the og:image filename to force a refresh.
  • Slack & Discord: unfurl links using OG tags but cap image dimensions in the chat layout — test how your 1200×630 crops in a narrow column.
  • WhatsApp: shows small thumbnails and requires the image under ~300KB for reliable previews; compress first.
  • X/Twitter: the validator was deprecated, so debugging is trial-and-error — post to a private test account to check the card.
  • iMessage: Apple’s crawler is picky about redirects and TLS; a preview that works everywhere else can still fail here.

The through-line: one correct, consistent tag set plus absolute URLs handles 95% of platforms. The remaining 5% is cache-busting and per-platform testing.

Related reading

Working through your page head in order? Start with Meta Tags: Title, Description & Open Graph Basics for titles and descriptions, then come back here for the social previews.

FAQs

HTML meta tags (og:title, og:description, og:image, og:url) that tell social platforms how to render your link preview — title, description, and image. Without them, platforms guess, and the guess is often wrong.

Open Graph is the general standard used by Facebook, LinkedIn, Slack, Discord, and WhatsApp. Twitter Cards (twitter:card, twitter:title, etc.) do the same job specifically for X/Twitter — use summary_large_image for the big image layout.

1200×630 is the widely recommended size. More important than exact dimensions: high contrast, large readable text, critical content away from edges, hosted at a stable public URL.

Platforms cache previews aggressively. Wait and re-share; some platforms offer debugger tools to force a refresh. A versioned image URL (build hash in the filename) helps bust image caches.

Usually not — most crawlers read the raw HTML response and do not run JavaScript. Tags must be in the server-rendered HTML. In Next.js, use the Metadata API rather than injecting tags client-side.

Common causes: relative URL instead of absolute, image blocked by robots/auth/hotlink protection, redirect chains, or the image behind a login. The crawler must fetch it anonymously from a stable public URL.

Generate your tags now

Use the Open Graph / Twitter Card Tag Generator — paste your title, description, and image, copy the tags, and fix your share previews in minutes.