BF50 Black Friday · 50% off all plans
from $5/mo · Auto-applied ---:--:-- Claim 50% off →
Skip to content

Search Seonio

Type a keyword, domain, or paste a URL

Start free with $1 to see full results. Powered by Seonio
SEO

Open Graph: Tags that shape your link previews

Open Graph tags tell social networks and chat apps which title, image and description to show when someone shares your page. Which tags to add and how.

Monthly searches · open graph
12.1k
Keyword research data
open graph
Open Graph: Tags that shape your link previews
Click the image to view it full size

Open Graph is a small set of <meta> tags in a page's <head> that describe the page as a shareable object: its title, type, image and address. When someone pastes your link into a social network or chat app, the app fetches the page, reads these tags and builds the preview card from them.

The protocol was created at Facebook and is published at ogp.me. Many other platforms read it too, so one set of tags shapes your previews in many places. Without the tags, each app guesses, and you may get a logo, a cookie banner's text or a cut-off sentence instead of the card you wanted.

The tags every page needs

The protocol names four required properties:

<head>
  <meta property="og:title" content="How to repot a fiddle-leaf fig">
  <meta property="og:type" content="article">
  <meta property="og:url" content="https://example.com/repot-fiddle-leaf-fig">
  <meta property="og:image" content="https://example.com/img/fig-repotting.jpg">
</head>
  • og:title is the headline on the card. It can be shorter and punchier than your page title.
  • og:type says what the object is. Use article for posts and news, website for everything else; a page without any type is treated as website.
  • og:url is the page's canonical address, used as its permanent ID. Make it match your canonical tag so all shares count towards one URL.
  • og:image is the picture on the card. Use an absolute URL.

Two optional tags are worth adding almost everywhere: og:description, a one- to two-sentence summary, and og:site_name, your site's name. The protocol also recommends og:image:alt, a short description of the image for people who can't see it.

Use property= (not name=) as the protocol does. Add each tag once: a tag can repeat (to offer several images, say), but when two values conflict, the first one wins.

Images: size and shape

The image does most of the work in a preview, and it's where most problems happen. Platforms set their own rules:

  • LinkedIn asks for at least 1200 × 627 pixels. Images narrower than 401 pixels show as a small thumbnail instead of a large card (LinkedIn Help).
  • X accepts JPG, PNG, WEBP and GIF under 5 MB, uses only the first frame of a GIF, and doesn't support SVG.

A good default is a wide image of about 1200 × 630 pixels: it meets LinkedIn's minimum and fits the wide card layouts most apps use. Keep text and faces away from the edges, since some apps crop. Add og:image:width and og:image:height so apps know the size before downloading the file, and make sure the image isn't blocked by robots.txt or a login, or the app can't fetch it.

Open Graph and X (Twitter) cards

X has its own tags, starting with twitter:, but its card documentation lists an Open Graph fallback for most of them. If twitter:title, twitter:description or twitter:image is missing, X uses og:title, og:description or og:image. Even without twitter:card, X may show a basic summary card when og:type, og:title and og:description exist.

So you usually need just one extra tag, to choose the card layout:

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

See Twitter cards for the card types and the remaining X-only tags.

Does Open Graph help SEO?

Not as a ranking factor: Open Graph tags don't move your page up in search results. Google does read some of them, though:

  • og:title is one of the sources Google may use when it writes a page's title link in search results.
  • og:site_name is one of the signals for the site name shown next to your results, after WebSite structured data.
  • og:image can influence which image Google Discover shows as the thumbnail for your page.

The bigger value is indirect. A clear title and a good image make people more likely to click a shared link, and every click from a share is a visit you'd otherwise not get.

Article and other types

Beyond website and article, the protocol defines types for books, profiles, music and video, each with extra properties. For articles, article:published_time, article:modified_time, article:author and article:section describe the post. Add them when your platform or CMS supports it; most apps ignore what they don't use.

Open Graph is metadata written in RDFa attributes, which is why the tags use property. It's separate from structured data such as schema.org, which search engines use for rich results; most sites need both.

Testing and fixing previews

Apps cache previews. After you change your tags, the old card can keep showing until the app fetches the page again. To check and refresh:

  1. View your page source and confirm the tags are in the <head> of the delivered HTML, not added later by JavaScript: a preview fetcher may not run your scripts.
  2. Run the URL through each platform's own inspector. LinkedIn's Post Inspector shows the preview and refreshes its cache; the refresh only affects new posts, not ones already published. Facebook has its own sharing debugger, linked from ogp.me.
  3. Share the link in a private message to yourself to see the real card.

If the wrong image keeps appearing, check for a second og:image tag earlier in the page, often added by a theme or a plugin.

Seonio

Put it to work on your own site

Keyword research, traffic, backlinks and clustering in one place. Start with a free $1 to test, no card required.