← All guides

Guide

The Complete Guide to Open Graph Tags: Every Tag, Who Reads It and How to Debug It

Every property in the Open Graph protocol, the twitter: tags X reads, which tags Facebook, LinkedIn, X, Slack, WhatsApp and Messages actually use, how fallbacks work, where each framework and CMS sets them, and how to debug a wrong preview.

What Open Graph tags are and who reads them

Open Graph tags are <meta> elements in the <head> of a page that describe it as an object: its title, type, canonical address and a picture. The protocol is published at ogp.me. Facebook started it, and other products read the same tags to build a link preview when someone pastes your URL.

Two facts shape this guide. The protocol is a specification and each platform is a separate reader of it: they agree on the core tags and differ on which are required, how large an image may be and how long they keep what they fetched. And the reader is a crawler, not a browser. It fetches your HTML once, usually without running scripts, keeps the result and serves later shares from that copy. A tag that exists only after JavaScript runs, or that the crawler was refused, does not exist for the preview.

This page is the reference and the hub: every tag, what each platform does with it, and a link to the guide that proves each platform claim. For a shorter introduction read what Open Graph is. For image dimensions, see OG image sizes.

The four required properties

The protocol requires four properties on every page:

  • og:title: the title of the object as it should appear in the graph. It is separate from the HTML <title>.
  • og:type: the type of the object, such as article. Depending on the type, other properties may also be required.
  • og:image: a URL for an image that represents the object.
  • og:url: the canonical URL of the object, used as its permanent ID in the graph.
<meta property="og:title" content="How we cut build times by 60%" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://your-site.com/blog/build-times" />
<meta property="og:image" content="https://your-site.com/og/build-times-v1.png" />

The platforms publish their own lists, and they differ. LinkedIn lists og:title, og:image, og:description and og:url (LinkedIn guide). Meta's WhatsApp page lists og:title, og:description and og:url, in the head and not empty, and does not list og:image (WhatsApp guide). Facebook assumes the page's own URL is canonical when og:url is absent (Facebook guide).

Write og:title, og:description, og:type, og:url and og:image on every page. That satisfies the protocol and each list above.

Optional metadata: every other tag in the protocol

The protocol lists these as optional and "generally recommended":

  • og:description: a one to two sentence description.
  • og:site_name: the name of the larger site, such as "IMDb". Use the brand, not the page.
  • og:locale: the locale of the tags, in the form language_TERRITORY. The default is en_US.
  • og:locale:alternate: other locales the page is available in, one tag each.
  • og:determiner: the word before the title in a sentence: a, an, the, blank or auto. Link previews rarely use it.
  • og:audio and og:video: a URL to a file that accompanies the object.

"Optional" means the protocol does not call a page invalid without the tag. Two of these matter more than the label suggests: og:description is required by LinkedIn and WhatsApp, and og:video is one of the four things Apple's tech talk names for Messages (iMessage guide).

Structured image properties and how arrays work

A property can carry extra metadata through a longer name. og:image has six:

  • og:image:url: identical to og:image.
  • og:image:secure_url: an alternate URL to use if the page requires HTTPS.
  • og:image:type: a MIME type.
  • og:image:width and og:image:height: the size in pixels.
  • og:image:alt: a description of what is in the image, "not a caption". The protocol says a page that specifies an image should specify this.
<meta property="og:image" content="https://your-site.com/og/build-times-v1.png" />
<meta property="og:image:secure_url" content="https://your-site.com/og/build-times-v1.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="A bar chart of build times before and after" />

The size tags have a use the protocol does not mention. Meta's FAQ says Facebook caches images asynchronously, so a card may not render the first time it is shared, and lists the size tags as one remedy because Facebook can then draw the image without measuring it (Facebook guide). og:video takes the same structured properties as og:image, and og:audio takes secure_url and type.

Arrays

To give a tag several values, repeat it. "The first tag (from top to bottom) is given preference during conflicts." A structured property belongs after its root tag, and a new root tag ends the previous one's properties:

<meta property="og:image" content="https://your-site.com/a.png" />
<meta property="og:image:width" content="300" />
<meta property="og:image:height" content="300" />
<meta property="og:image" content="https://your-site.com/b.png" />
<meta property="og:image" content="https://your-site.com/c.png" />
<meta property="og:image:height" content="1000" />

That is three images: the first is 300 by 300, the middle one has unspecified dimensions, and the last is 1000 pixels tall. A theme and a plugin that both print og:image have written an array by accident, and a reader that takes the first value reads whichever source printed first.

Object types and the properties each one adds

og:type picks the kind of object, and a type's extra properties use its namespace as a prefix. The protocol says an unmarked page is a website, and properOG's checker assumes the same and warns on a missing type.

  • website: no properties beyond the basic ones.
  • article: article:published_time, article:modified_time, article:expiration_time, article:author, article:section and article:tag.
  • book: book:author, book:isbn, book:release_date and book:tag.
  • profile: profile:first_name, profile:last_name, profile:username and profile:gender.
  • payment.link, marked "Beta only" on ogp.me: payment:description, payment:currency, payment:amount, payment:expires_at, payment:status, payment:id and payment:success_url.
  • music.song: music:duration, music:album, music:album:disc, music:album:track and music:musician. music.album: music:song, music:song:disc, music:song:track, music:musician and music:release_date. music.playlist adds music:creator to the album's song properties, and music.radio_station has only music:creator.
  • video.movie: video:actor, video:actor:role, video:director, video:writer, video:duration, video:release_date and video:tag. video.episode adds video:series. video.tv_show and video.other take the movie's properties.
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2026-11-02T09:00:00Z" />
<meta property="article:modified_time" content="2026-11-20T14:30:00Z" />
<meta property="article:author" content="https://your-site.com/authors/ada" />
<meta property="article:section" content="Engineering" />
<meta property="article:tag" content="performance" />
<meta property="article:tag" content="build tools" />

Other types are namespaced CURIEs, declared with a prefix attribute on the head. For most sites the choice is small: website for general pages, article for posts, and the article: properties when you have the dates and author. The platform guides linked here document no card that changes with a type-specific property, so treat those properties as data for readers of the graph.

The twitter: tags X reads

X reads its own tags first and Open Graph second: the card processor "first checks for the Twitter-specific property, and if not present, falls back to the supported Open Graph property". X has removed its Cards pages from its live docs, so these facts come from Internet Archive copies of early 2026 that the X card guide links. The tag reference lists:

  • twitter:card: summary or summary_large_image for a website. If og:type, og:title and og:description exist and this is absent, "a summary card may be rendered", which is the small card. It is the one tag X does not infer.
  • twitter:title (maximum 70 characters), twitter:description (200), twitter:image (under 5 MB; JPG, PNG, WEBP or GIF; no SVG) and twitter:image:alt (420), each falling back to its Open Graph twin.
  • twitter:site and twitter:site:id: the website's account. The table marks one of them required, while the large image card page lists only twitter:card. I could not test which X enforces, so add twitter:site if the site has an account.
  • twitter:creator and twitter:creator:id: the author's account, with no Open Graph fallback.
  • twitter:player with its width, height and stream tags, and the twitter:app: name, id and url tags for iphone, ipad and googleplay: for the player and app cards, with no fallback.

So declare Open Graph per page and add twitter:card set to summary_large_image. Declare twitter:image or twitter:title only where a page needs a different value on X, and then per page, because X takes a site-wide Twitter value over a page's own Open Graph one. The audit reports that as twitter_image_stale, twitter_image_shared and twitter_title_generic, and a summary card beside a large image as twitter_card_small.

Which tags each platform actually uses

The protocol is the superset, and each crawler reads less of it. This is what the spoke guides established, each with the platform's own words and the date read.

  • Facebook: groups links by og:url, caches metadata until a re-scrape or about 30 days, caches images by URL, and reads Open Graph properties only from the first 1 MB of the document. Images under 600 by 315 render as a small square. og:image:type is documented as JPEG, GIF or PNG. (Guide)
  • LinkedIn: prefers structured metadata, lists four required tags, and does not list twitter:image as a source. Images under 401 pixels wide show as a thumbnail; the maximum file size is 5 MB. (Guide)
  • X: twitter: tags first, Open Graph second, and twitter:card needed for a large image. (Guide)
  • Slack: looks for oEmbed, Twitter Card and Open Graph tags, fetches with Range requests so tags belong near the top, caches around 30 minutes, and says it does not honor robots.txt. It does not say which source wins, so make them agree. (Guide)
  • WhatsApp: requires og:title, og:description and og:url, the head within the first 300 KB, and an image under 600 KB and at least 300 pixels wide. It documents no cache lifetime or refresh. (Guide)
  • Messages: names the title, icon, image (og:image) and video (og:video), runs no JavaScript, and limits icon, image and video to 10 MB together. It names no description. (Guide)

og:title and og:image are named by every platform above, and og:url by Facebook, LinkedIn and WhatsApp, so get those three right first. Nearly everything past title, description, image and URL is read by one platform or none, which is why the short head below serves most pages.

How fallbacks work, and where they stop

Fallbacks are why a page with few tags still gets a preview, and why a preview can be wrong while every tag is valid.

  • Twitter to Open Graph: title, description, image and image alt, not the card type.
  • og:type to website: the protocol's default.
  • og:url to the page's URL: Facebook's assumption. The danger is a template that hardcodes the homepage here, which makes every page one resource to Facebook and shows another page's card.
  • Page to site-wide default: every CMS below keeps a site image for pages that have none, which is the usual reason a hundred pages share one card.
  • Open Graph to a guess: with no image tag the platform picks something or shows nothing. Squarespace documents an order that ends in "whatever the social network guesses" (guide).

Fallbacks stop in three places. A tag that is present but wrong does not fall back: an og:image that returns 404 gives a blank card. A tag in the wrong place does not count: Facebook's 1 MB, WhatsApp's 300 KB and Slack's Range requests mean a tag below a large inline script is a missing tag. And caches differ by platform, so one fix reaches Slack in about half an hour and Facebook after a re-scrape.

A complete head to start from

This head carries what most pages need: the five core Open Graph tags, the image properties that save a platform a download, the one Twitter tag that cannot be inferred, and the article type with its date. Replace the values, make every URL absolute and HTTPS, and generate it per page.

<title>How we cut build times by 60%</title>
<meta name="description" content="Four changes to our CI pipeline took a 14 minute build to under six." />
<link rel="canonical" href="https://your-site.com/blog/build-times" />

<meta property="og:title" content="How we cut build times by 60%" />
<meta property="og:description" content="Four changes to our CI pipeline took a 14 minute build to under six." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://your-site.com/blog/build-times" />
<meta property="og:site_name" content="Your Site" />
<meta property="og:locale" content="en_US" />
<meta property="og:image" content="https://your-site.com/og/build-times-v1.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="A bar chart of build times before and after" />
<meta property="article:published_time" content="2026-11-02T09:00:00Z" />

<meta name="twitter:card" content="summary_large_image" />

The image filename carries a version because platforms cache images by URL: change the file, change the name. The canonical link and og:url agree, and the tags sit at the top of the head, ahead of scripts and styles. properOG's fetcher reads either property or name for any tag, but a platform may not, so keep the attributes as shown. properOG's checker passes this head, given a 1200 by 630 image that loads.

Where your framework or CMS sets these tags

Most OG problems are a system writing a different tag than you meant. Each guide starts from where that platform produces the tags:

  • Next.js: metadata objects replace, so a page that declares openGraph loses the inherited image.
  • WordPress: core prints none; a plugin or theme does, and two printers is the common fault.
  • Shopify: the theme's Liquid prints the tags and Shopify picks the image.
  • Webflow: page and collection template settings, plus custom code printed as written.
  • Squarespace: a social sharing logo and an alternate image per page, in a documented order.
  • Wix: tags written from the Social share settings, with defaults by page type.
  • Framer: site, page and CMS-bound settings, the narrowest winning.
  • Ghost: one helper, {{ghost_head}}, with separate image lists for Open Graph and X.
  • HubSpot: the page's featured image is the source.

For any other stack the rule is the same: the tags must be in the HTML the server returns. Messages states it for its own fetcher; the first debugging step below shows what any crawler gets.

Debugging: find out what the crawler saw

Debug in the order the crawler works. Each step rules out one layer.

1. Read the served tags, not the inspector. The inspector shows the page after scripts ran; a crawler sees the response body.

curl -s --compressed -A 'facebookexternalhit/1.1' https://your-site.com/blog/build-times \
  | grep -oE '<meta [^>]*(og|twitter|article):[^>]*>'

You want one og:image, an absolute og:url that is this page's own address, and this template's values, not the homepage's. Two copies of a tag mean two sources. A tag in the inspector and not here is invisible to crawlers.

2. Fetch the image the same way.

curl -s -o /dev/null -D - -A 'facebookexternalhit/1.1' \
  https://your-site.com/og/build-times-v1.png

You want a 200, an image/* content type and a size well under a megabyte. properOG reports a failure as image_broken (critical), or image_unverified (warning) when the host refused its request. It fetches as ProperOGBot, so it cannot see a block aimed at another user agent.

3. Check what blocks the crawler. A robots.txt rule, bot challenge or firewall produces a card that never appears. Slack says it ignores robots.txt; X says its crawler respects it.

4. Ask the platform. Facebook has the Sharing Debugger and LinkedIn Post Inspector, both behind a login. X has had no validator preview since August 2022, so the post composer is the preview. Slack has the Unfurl Debugger. WhatsApp and Messages have none: send the link to yourself. Each guide above gives the refresh steps.

5. Change the URL of a changed image. Facebook and X cache images by URL, and overwriting a file at the same address tells neither anything. Publish the new card at a new URL and keep the old file for posts that reference it.

The testing checklist puts this routine in order for a launch, and OG image best practices covers design rules that hold on every platform.

What properOG checks, and how it grades

The checker reads a page as a crawler does and scores it out of 100. A is 85 and up ("Proper"), B 65 ("Almost"), C 45 ("Needs work"), D below ("Not proper"). The points:

  • Image dimensions, 30 points: 1200 by 630 up to 2400 by 1260 is ideal, and a ratio within 0.1 of 1.905 is a good one.
  • OG image, 25 points: the tag exists. Whether the file loads is a separate "Image loads" check with no points of its own.
  • File size, 15 points: full under 500 KB, partial under 1 MB.
  • Title, 10 points: 20 to 70 characters passes.
  • Description, 7 points: 50 to 160 characters passes.
  • Twitter card, 5 points: twitter:card present.
  • Image format, 5 points: WebP and AVIF score above PNG and JPEG. Facebook documents og:image:type as JPEG, GIF or PNG only, so PNG or JPEG is the safer file for a card that must show everywhere.
  • og:type, 3 points. The checker does not score og:url, so read it yourself in the served tags.

The site audit samples your sitemap's templates and reports findings: image_missing and image_broken (critical); image_unverified, image_shared, image_oversized (over 500 KB), image_uncacheable, twitter_card_small, twitter_image_stale, twitter_image_shared and twitter_title_generic (warnings); and image_undersized (info, under 1200 pixels wide). image_shared names the template problem behind most "every page looks the same" reports. To see well-built cards, browse the gallery.

Verify your fix

Check the page. The checker reads your URL and lists the tags it found. Enter the page you fixed, or check this guide's own card as an example. Its platform previews model each card and are not a render by the platform.

Check the site. The site audit samples your templates, since one page is rarely the only broken one.

Check what each platform stored. Use the platform's debugger after you deploy. A platform that shows the old card while the checker shows the new one is serving its cache: follow its refresh steps and change the image's URL. If the tags themselves are wrong, fix them where your system produces them, in the guides listed above.

Frequently Asked Questions

Which Open Graph tags are required?

The protocol requires og:title, og:type, og:image and og:url. LinkedIn lists og:title, og:image, og:description and og:url, and WhatsApp lists og:title, og:description and og:url. Writing all five of og:title, og:description, og:type, og:url and og:image on every page satisfies each list.

Do I need both Open Graph and Twitter Card tags?

No. X's documentation says its card processor checks the Twitter property first and falls back to the Open Graph one for title, description, image and image alt. The card type, twitter:card, is not inferred, so add that one tag with the value summary_large_image.

What should I set og:type to?

Use website for general pages and article for posts, adding article:published_time and the other article properties when you have them. The protocol treats a page with no type as a website. Other global types cover books, profiles, music and video.

Can I put more than one og:image on a page?

The protocol allows it: repeat the tag, and the first from top to bottom is preferred in a conflict. Structured properties such as og:image:width must follow the image they describe. A second og:image is usually an accident, from a theme and a plugin both printing one, so declare one per page.

Why does my page show a different preview on every platform?

Each platform reads a different set of tags, with its own crawler and its own cache. X prefers twitter: tags, Slack reads oEmbed, Twitter Card and Open Graph, and Facebook caches until re-scraped. Read the served tags with a crawler user agent first, then use each platform's debugger.

Audit your site

Sample pages across every template in your sitemap and see which ones ship the wrong card, or none. Free, no account needed.

Related guides