Audit my site
On-pageBeginnerChecked against official sources · Oct 2026

Open Graph and social cards: making shared links look right

Open Graph tags decide the title, description and image people see when your URL is shared on social networks, in messengers and in Slack. They do not move rankings, but every broken preview costs clicks.

Author: Eugene Serbin, Head of SEO at Semalt Updated: 30 October 2026 Reading time: 18 min Visuals: 4

In short

Open Graph tags are a few <meta> lines in the <head> that decide the title, description and image people see when your URL is shared on Facebook, LinkedIn, X, in messengers and in Slack. They are not a Google ranking factor, but a broken link preview costs you clicks every time someone shares the page. Get four required tags right, add a properly sized image with an absolute URL, and use the official debuggers to refresh the cache after every change.

What Open Graph does (and what it does not)

When someone pastes a link into a post or a chat, the platform sends its own crawler to fetch the page. The crawler reads the HTML and builds a link preview, also called a card: an image, the site name, a title and a short description. Open Graph is the vocabulary that tells the crawler which values to use. In the protocol's own words, “The Open Graph protocol enables any web page to become a rich object in a social graph.”

Without these tags the crawler guesses. Meta describes exactly that: “Without these Open Graph tags, the Facebook Crawler uses internal heuristics to make a best guess about the title, description, and preview image for your content.” In practice the guess is often a logo, a cookie-banner sentence or an icon from the footer.

Mock-up · Anatomy of a link preview card (illustrative)
Which Open Graph tag fills which part of a link preview An illustrative link preview card. The large image at the top comes from og:image, with og:image:width, og:image:height and og:image:alt describing it; key content sits in a central safe zone. Below it, a small line with the site name comes from og:site_name or the domain, the bold headline from og:title and the grey text from og:description. og:image 1200 × 630 px · about 1.91:1 safe zone for key text EXAMPLE.COM How to bake sourdough at home A step-by-step guide with timings, flour ratios and photos. og:image og:image:width / height og:image:alt og:site_name og:title og:description size known before the download or the bare domain no “| Brand” suffix one or two sentences
Each slot of the card maps to one tag; platforms differ in layout, but the inputs are the same.

Two limits are worth stating plainly. First, Open Graph does not change your position in Google. Its value is the click-through rate from shares, and that is real traffic. Second, Google does read og:title, but only as one of many inputs for the title link in search results, next to the <title> element, the H1 and anchor text. The lesson Title tags covers how those title links are built.

What the official sources say

Open Graph is an open protocol published at ogp.me. Meta, LinkedIn and X each document how their own crawler reads it. These are the sentences that matter most, quoted word for word.

“The first tag (from top to bottom) is given preference during conflicts.”

The Open Graph protocol — Arrays

“Most content is shared to Facebook as a URL, so it's important that you mark up your website with Open Graph tags to take control over how your content appears on Facebook.”

Meta for Developers — A Guide to Sharing for Webmasters

“When the Twitter card processor looks for tags on a page, it first checks for the Twitter-specific property, and if not present, falls back to the supported Open Graph property.”

X Developer Platform — Getting Started with Cards (archived copy)

“The LinkedIn share box relies on websites to use oEmbeds and/or Open Graph Protocol (OGP) to display the most accurate title, description, and image when sharing a URL.”

LinkedIn Help — Troubleshooting issues sharing URLs

“Google Search uses the following sources to automatically determine title links”

Google Search Central — Influencing your title links. One item on that list is “Content in og:title meta tags”.

X has removed its Cards pages from the live developer site; the old URLs now redirect to the docs home. The X quotes in this lesson come from the Internet Archive copies of those pages from January and February 2026, linked in Sources.

The four required properties

The protocol is direct about the minimum: “The four required properties for every page are:” og:title, og:type, og:image and og:url. Here is how ogp.me defines each one, and what that means for your pages.

The syntax uses the property attribute, not name, and every tag belongs in the server-rendered <head>:

<meta property="og:title" content="How to bake sourdough at home">
<meta property="og:type" content="article">
<meta property="og:image" content="https://example.com/og/sourdough.jpg">
<meta property="og:url" content="https://example.com/blog/sourdough/">

LinkedIn's list of what it needs is slightly different. Its help page says “Below are the og: tags that must exist and their correct format” and lists og:title, og:image, og:description and og:url. So in practice treat og:description as required too.

Recommended extras

The protocol calls a second group of properties optional but “generally recommended”. These are the ones worth adding to every template:

Order matters. Image properties describe the image declared just before them: “Put structured properties after you declare their root tag.” If you list several images, the first one is preferred, so the image you want on the card goes first. For articles, you can also add article:published_time and article:author from the article type.

Code · A complete, annotated set of social meta tags

Open Graph · property=

<!-- required -->
<meta property="og:title"
      content="How to bake sourdough at home">
<meta property="og:type" content="article">
<meta property="og:url"
      content="https://example.com/blog/sourdough/">
<meta property="og:image"
      content="https://example.com/og/sourdough.jpg">
<!-- describe the image right after it -->
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt"
      content="Sourdough loaf on a wooden board">
<!-- recommended -->
<meta property="og:description"
      content="Timings, flour ratios and photos.">
<meta property="og:site_name" content="Example Kitchen">
<meta property="og:locale" content="en_GB">
  • Absolute https:// URLs only
  • og:url equals the canonical
  • Width, height and alt follow the image

X card · name=

<!-- the only tag X needs on top of OG -->
<meta name="twitter:card"
      content="summary_large_image">

<!-- optional attribution -->
<meta name="twitter:site" content="@example">
<meta name="twitter:creator" content="@author">

<!-- only if X should differ from OG -->
<meta name="twitter:title" content="…">
<meta name="twitter:image" content="…">
  • X falls back to og:title, og:description, og:image
  • Without twitter:card you may get the small summary card
  • One card type per page
One Open Graph set serves every platform; X needs a single extra tag to show the large image.

X (Twitter) card tags and the fallback to Open Graph

X has its own tags with the twitter: prefix, but it reads Open Graph when they are missing. Its documentation is explicit that you do not need to duplicate anything: “Twitter's parser will fall back to using property and content, so there is no need to modify existing Open Graph protocol markup if it already exists.”

The card type is the one value with no Open Graph equivalent. twitter:card takes one of four values: summary (small thumbnail next to the text), summary_large_image (full-width image), app and player. “Only one card type per-page is supported.” If you leave it out, X decides for you: “If an og:type, og:title and og:description exist in the markup but twitter:card is absent, then a summary card may be rendered.” That is why so many links on X show a small square instead of the large image you designed.

The other tags are optional: twitter:site and twitter:creator for the account handles, and twitter:title, twitter:description, twitter:image and twitter:image:alt only when the X version should differ from Open Graph. Note the attribute: X tags use name, Open Graph uses property.

Image size and ratio: what each platform documents

The image causes most preview problems, so it helps to know exactly what each platform publishes. The numbers below are each platform's own; nothing is averaged or invented.

Meta: “The minimum allowed image dimension is 200 x 200 pixels.” “The size of the image file must not exceed 8 MB.” “Use images that are at least 1200 x 630 pixels for the best display on high resolution devices.” And on shape: “Try to keep your images as close to 1.91:1 aspect ratio as possible to display the full image in Feed without any cropping.”

X, for the large image card: “Images for this Card support an aspect ratio of 2:1 with minimum dimensions of 300x157 or maximum of 4096x4096 pixels.” Also: “Images must be less than 5MB in size.” JPG, PNG, WEBP and GIF are accepted, “Only the first frame of an animated GIF will be used.” and “SVG is not supported.”

LinkedIn lists a 5 MB maximum, a minimum of 1200 × 627 pixels and a recommended ratio of 1.91:1 for its sharing module.

Table · What each platform reads and documents
PlatformTags it readsImage sizeFile limitCache and refreshOfficial tool
FacebookOpen Graphmin 200 × 200; at least 1200 × 630 recommended; about 1.91:18 MBCached on first share; images cached by URLSharing Debugger
LinkedInOpen Graph, oEmbedmin 1200 × 627; 1.91:1 recommended5 MBAllow 48 hours; Post Inspector refreshesPost Inspector
Xtwitter: tags, falls back to Open GraphLarge card: 2:1, 300 × 157 to 4096 × 4096under 5 MB; no SVG7 days; images cached by URLNo current preview tool (practice)
Messengers, SlackOpen Graph; Slack also oEmbed and twitter: (practice)Not published; 1200 × 630 works (practice)Not published; keep it small (practice)Cached by each app (practice)Telegram: @WebpageBot (practice)
Rows for Facebook, LinkedIn and X are taken from their own documentation; the messenger row is field practice, since those apps publish no specification.

One image that works everywhere

A 1200 × 630 pixel JPG or PNG meets Meta's recommendation, clears LinkedIn's 1200 × 627 minimum and sits close enough to X's 2:1 that only a thin strip is trimmed. Keep the file well under 1 MB in practice: messengers fetch the image while the user waits, and slow, heavy images are the first thing they skip. Keep the headline and any logo inside a central safe zone, because some surfaces crop to a square thumbnail.

Make the image specific to the page. X says it plainly: “You should not use a generic image such as your website logo, author photo, or other image that spans multiple pages.” A site-wide default image is a fallback, not a strategy. For alt text, formats and compression in general, see the lesson Images: alt, formats, sizes, lazy loading.

Messengers and Slack

Telegram, WhatsApp, Slack, Discord, iMessage and Viber all build their previews from the same Open Graph tags. None of them publishes a full specification, so what follows is practice, not documentation:

Caching and how to refresh a preview

Every platform caches what it fetched, which is why a fixed tag can still show the old preview. Meta explains the first share: “The crawler has to see an image at least once before it can be rendered.” And for images in particular: “Images are cached based on the URL and won't be updated unless the URL changes.” X works the same way: “Content is cached by Twitter for 7 days after a link to a page with card markup has been published in a Tweet.” and “Images referenced in a Card are also cached based on URL.”

Facebook: Sharing Debugger

Paste the URL into the Sharing Debugger at developers.facebook.com/tools/debug/. It shows the tags the crawler read, warnings and the preview. “The debugger also triggers a scrape of your page, so if you do have errors in your HTML you can use the debugger to update your content.” Click Scrape Again after each fix. Posts that already exist do not change: “Note that updating the image for a URL will not automatically update the preview for old shares.”

LinkedIn: Post Inspector

“You can use the Post Inspector as a tool to refresh the URL.” Enter the URL at linkedin.com/post-inspector/ and check the preview. Existing posts keep what they had: “The preview for any existing posts with this URL will remain the same.” LinkedIn also warns: “If you're a developer and have recently updated tags on a site, please wait 48 hours for your changes to take effect.”

X, messengers and Slack

X's old Card Validator no longer shows a preview, so in practice you check the card in the post composer and wait out the cache for links already posted. In Telegram, send the URL to @WebpageBot to refresh the preview. Other chat apps offer no tool; their cache expires on its own schedule.

Changing the image

Because images are cached by URL everywhere, never overwrite an image file and hope. Publish the new image under a new URL, such as /og/sourdough-v2.jpg or sourdough.jpg?v=2, update og:image, then rescrape in the Sharing Debugger and Post Inspector.

Dynamic and generated OG images

A site with thousands of articles or products cannot design each card by hand. The standard practice is a generated image per page:

Consistency with title, description and canonical

Social tags should tell the same story as your search tags.

Open Graph is not structured data in Google's sense. It does not create rich results, and it does not replace Article or Product markup. The lesson Structured data in 2026 covers that side.

Check the pages behind your shared links

OurSEO Tools crawls up to 1,000 pages and records the status code, canonical, indexability and load time of every URL, and runs a 69-point checklist that includes on-page signals.

69-point checklistTechnical crawlContent analysis

Common mistakes

Debugging workflow step by step

Diagram · Debugging a broken link preview
Six steps to debug a link preview Step 1, view the raw HTML and check the tags are in the head with absolute URLs. Step 2, open the image URL and check it returns 200, is a JPG or PNG and is not blocked. Step 3, run the official tools: Sharing Debugger and Post Inspector. Step 4, read the warnings to see what the crawler saw. Step 5, fix the template, keep one set of tags and use a new image URL if the image changed. Step 6, scrape again and test a real post. 1 · View the raw HTML2 · Open the image URL3 · Run the official tool 4 · Read the warnings5 · Fix the template6 · Scrape again, share tags in <head>, one set,absolute https:// URLs status 200, JPG or PNG,not blocked, small file Sharing Debugger,Post Inspector what the crawler saw,missing tags, image size one tag set; new imageURL if the image changed Scrape Again / Inspect,then test a real post
Check what the crawler receives before you change anything, and always finish with a rescrape.
  1. Look at the HTML the crawler gets. Use View Source or curl, not the browser inspector. Confirm one set of tags in the <head> with absolute URLs.
  2. Open the og:image URL on its own. It should return 200 with an image content type, without a login, redirect chain or bot challenge, and should not be disallowed in robots.txt.
  3. Run the Sharing Debugger and Post Inspector. They show what each crawler actually read.
  4. Read every warning. Missing properties, an image below the minimum size, a URL that redirects or an og:url that differs from the address you entered.
  5. Fix the template, not just the page. If the image changed, give it a new URL.
  6. Rescrape and test. Click Scrape Again and Inspect, check the X composer, and send the link in Telegram or Slack.
  7. Check other templates. Repeat for a category, a product, a tag page and the home page.

Two server issues also show up here. Meta notes: “Our crawler only accepts gzip and deflate encodings, so make sure your server uses the right encoding.” And X documents that “Twitter's crawler respects Google's robots.txt specification when scanning URLs.” A disallow rule for an images folder therefore blocks the card image too.

FAQ

Do Open Graph tags help my Google rankings?

No. They are not a ranking factor. Google may use og:title as one input for the title link, but the real benefit is better-looking shares and more clicks from social and chat.

What is the best OG image size?

1200 × 630 pixels, JPG or PNG, well under 1 MB in practice. That meets Meta's recommendation and LinkedIn's minimum and is close to X's 2:1.

Do I need both Open Graph and Twitter card tags?

You need Open Graph plus one twitter:card tag. X reads og:title, og:description and og:image when its own tags are missing.

I fixed the tags, but Facebook still shows the old preview. Why?

It is cached. Run the URL through the Sharing Debugger and click Scrape Again. If the image changed, it also needs a new URL. Old posts keep their old preview.

Can I set Open Graph tags with JavaScript?

It is risky. Most social fetchers do not run JavaScript, so tags must be in the HTML your server sends. Server-side rendering or prerendering solves it.

Should og:url be the same as the canonical?

Yes. Meta calls it the canonical URL and asks for the undecorated version, so match your rel="canonical" exactly and leave out tracking parameters.

Sources

Quotes checked against the official pages on 30 October 2026.