OGKit

What Open Graph actually solves

  • open-graph
  • social-preview
  • overview

Someone drops your launch URL into a Slack channel. The card has no image, a truncated title from the wrong page, and a description that still mentions last quarter's campaign. The marketing thread freezes on "is this the right link?" while you scramble for the "real" one.

That is not a branding problem. That is Open Graph failing at the one job it has: telling every unfurl client how your URL should look as a card.

Not "title again" — the card contract

Open Graph is a set of meta tags (og:title, og:type, og:url, og:image, plus the description and site name you almost always need) that social networks, chat apps, and collaboration tools read when they expand a link.

Browsers already have <title> and meta description. Those shape tabs and search snippets. OG is the share surface: Facebook / Meta, LinkedIn, X, Slack, Discord, WhatsApp, Telegram, and many smaller clients. Each one scrapes your HTML, picks fields by its own rules, caches the result, and draws a card. If the tags are missing, relative, JS-only, or stale in cache, the card is wrong — even when the page looks fine to you.

Two problems get mixed up constantly:

Problem What you are optimizing Tooling family
Your site when others share it Correct tags, images, crawler access, rescrape Debuggers, preview sites, generators, CI checks
Your product unfurling other people's links Safe fetch, parse, cache, SSRF limits Unfurl APIs and libraries

Same protocol, opposite ownership. This series is about the first row. If you are building the second, you need a crawler stack — not another meta tag generator.

The real workflow (most tutorials stop at step one)

  1. Write correct tags — absolute HTTPS URLs, consistent og:url / canonical, a usable image. See the rule reference for the exact checks.
  2. Preview across platforms — third-party multi-preview tools approximate layout and truncation. Useful for day-to-day QA.
  3. Force official rescrape — only Meta Sharing Debugger, LinkedIn Post Inspector, and peers can invalidate their cache. Approximations cannot.
  4. Optional: dynamic images — per-post art via Next opengraph-image, Satori, or a template API when one static PNG is not enough.
  5. Prevent regressions — tags rot in refactors, CMS defaults, and SPA shells. CI and lint-style rules catch that.

Most "how to add Open Graph" posts end at step 1. Production pain lives in steps 2–5: WhatsApp silent image drops, LinkedIn still showing last month's hero, SPA crawlers that never see client-injected meta, staging URLs no public debugger can reach.

Protocol minimum vs de facto standard

The protocol's required four are og:title, og:type, og:url, and og:image. In practice you also need og:description and usually og:site_name, plus Twitter Card fields (twitter:card, image/title fallbacks) because some clients still lean on them.

None of that is optional folklore. Platforms treat OG as the de facto link-preview standard even when their UI docs say "rich cards" or "unfurls". Details and edge cases differ by platform — image byte budgets, crop ratios, title length — but the contract is shared.

A companion post in this series walks the blank card checklist. The next one goes field-by-field through the required meta set (planned: required Open Graph meta tags).

Development vs post-launch maintenance

Phase What goes wrong What actually helps
Build Relative image URLs, missing description, wrong type, tags only after hydration Server-rendered meta, absolute URLs, rule checks in PR
Ship First scrape caches a broken card forever Official debugger "scrape again" / Post Inspector
Iterate New image, same URL → old card Rescrape each major platform; never assume TTL is short
Scale Hundreds of pages, one CMS default missing og:image Site-wide scan + CI gate on critical paths

If you only validate in a browser extension on your laptop, you will miss crawler blocks, production CDN rules, and cache. If you only use a multi-preview website, you will fix layout and still ship a stale Meta cache. You need both layers.

The rescrape helper lists official entry points per URL when step 3 is the blocker.

One-page tool map

Need Reach for Do not expect
Force platform cache refresh Official debuggers (Meta, LinkedIn, …) Third-party preview sites
Multi-platform visual QA Aggregated preview / score sites Authoritative cache invalidation
Bootstrap static meta HTML Tag generators Ongoing correctness
Per-URL or per-post images Dynamic OG image runtimes / template APIs Automatic platform rescrape
Unfurl inside your app Metadata / link-preview APIs & scrapers Improving your share card
Catch regressions in CI Rule engines, CLI scanners, tests on HTML fixtures Pretty mockups

Industry gaps that still hurt: private / localhost previews, CI gates with stable rule IDs, and image engineering (bytes, redirects, content-type, platform budgets). That is the niche OGKit sits in — think ESLint + Lighthouse, but for Open Graph: crawl like a bot, grade with named rules, fail the build when a share card would break.

Checklist before you ship a share-sensitive URL

  • og:title, og:type, og:url, og:image present in raw HTML (not only the hydrated DOM)
  • Image and URL are absolute HTTPS; image responds 200 without auth or endless redirects
  • Description is intentional, not empty CMS placeholder
  • Curl with a social crawler User-Agent is not blocked by robots / WAF
  • After any tag or image change, you rescrape the platforms that matter to you
  • Critical templates are covered by an automated check so the next redesign cannot silently drop meta

Full machine-readable checks: OGKit rules. Platform-specific behavior: platforms.

What to read next

  1. Why your Open Graph card is blank — five failure modes you can separate in a minute
  2. Required OG / Twitter meta tags (next in series) — the minimal correct set
  3. Platform card differences — why the same tags crop differently on LinkedIn vs Slack
  4. Image engineering, cache / rescrape, SPA crawlers, CI gates — later entries in the series

Try it on a public URL

Paste a live page into the homepage scanner. You get a rule-backed report instead of a single "looks fine" mock. For local or staging hosts that the public crawler cannot reach, the browser extension path is the follow-up — covered later in this series.