Open Graph Protocol: Tags, Types and Debugger Checks

November 11, 2026 · 12 min read

Open Graph Protocol: The Meta Tags Behind Every Link Preview

The open graph protocol is a set of <meta> tags in a page's <head> that controls how a shared link looks. Facebook, LinkedIn, chat apps and other crawlers read them to pick the title, image, URL and description for the preview card. Four properties are required on every page: og:title, og:type, og:image and og:url. Most of the rest is optional.

What Is the Open Graph Protocol?

The spec lives at ogp.me, and its stated goal is to let any web page become a "rich object" in a social graph. In practice, that object is the link card you see when a URL is pasted into a post or a message. The spec says the protocol was originally created at Facebook and builds on RDFa, which is why the tags use a property attribute rather than name.

You don't write these tags in your article body. They sit in the HTML <head>, next to the <title> element, while your Markdown turns into the visible content below it. If that split is new to you, our Markdown vs HTML comparison shows where each one lives. A crawler fetches your page, reads the og: values and builds the preview from them, so the reader never sees the tags themselves.

What Are Open Graph Tags? The Four Required Properties

Open Graph protocol tags are <meta> elements whose property starts with og:. The spec marks four of them as required for every page.

PropertyWhat it holdsExample value
og:titleThe object's title as it should appear in the graphHow We Cut Build Times
og:typeThe kind of object; some types need extra propertiesarticle
og:imageAn image URL that represents the objecthttps://example.com/cover.jpg
og:urlThe canonical URL, used as the object's permanent IDhttps://example.com/blog/builds

The image is the tag people fiddle with most, and it has its own rules for size, format and design. Our Open Graph image guide covers all of that, so this post treats og:image as one line in the set.

Here's a complete head with the required properties plus a description:

<html prefix="og: https://ogp.me/ns#">
<head>
  <title>How We Cut Build Times | Example Blog</title>
  <meta property="og:title" content="How We Cut Build Times" />
  <meta property="og:type" content="article" />
  <meta property="og:url" content="https://example.com/blog/builds" />
  <meta property="og:image" content="https://example.com/cover.jpg" />
  <meta property="og:description" content="Three changes that took our CI run from 14 minutes to 5." />
</head>

The prefix attribute on <html> declares the og: namespace, as the spec's own example does. Each meta line names one property and puts its value in content. Use absolute URLs for og:url and og:image, because the crawler reads them out of context.

Optional Open Graph Protocol Meta Tags, Structured Properties and Arrays

Beyond the required four, the spec lists optional properties that it describes as generally recommended:

  • og:description: a one to two sentence summary of the object.
  • og:site_name: the name of the larger site, such as IMDb in the spec's example.
  • og:locale: the language the tags are written in, as language_TERRITORY. The default is en_US.
  • og:locale:alternate: other locales the page is available in.
  • og:determiner: the word that appears before the title in a sentence. It's one of a, an, the, an empty string or auto, and blank is the default.
  • og:audio and og:video: URLs to an audio or video file that goes with the page.

Some properties carry extra metadata, which the spec calls structured properties. You write them as the root property plus another colon and a sub-name. For example, og:video can take og:video:secure_url and og:video:type. og:audio gets only url, secure_url and type, since size doesn't apply to sound. The spec also says that a page with og:image should include og:image:alt, a plain description of what the picture shows.

When a property can hold several values, you repeat the tag. That's an array, and the first tag from the top wins when values conflict. Structured properties attach to the most recent root tag above them:

<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:locale:alternate" content="es_ES" />
<meta property="og:video" content="https://example.com/demo.mp4" />
<meta property="og:video:type" content="video/mp4" />

This block says the page is in US English, also exists in French and Spanish, and has one MP4 video. The og:video:type line belongs to the video above it. Put a second og:video after it and any new sub-properties would describe that second file instead.

What Is an OG Type? website, article and the Other Values

og:type tells consumers what kind of thing the page represents. The spec states that any page without markup should be treated as website, so that's the default. Other types add extra properties in their own namespace.

The article type is the one blogs care about. It adds article:published_time, article:modified_time, article:expiration_time, article:author, article:section and article:tag. Author and tag are arrays, so you repeat them for several values. Dates use ISO 8601.

<meta property="og:type" content="article" />
<meta property="article:published_time" content="2026-11-11T09:00:00Z" />
<meta property="article:section" content="Engineering" />
<meta property="article:tag" content="CI" />
<meta property="article:tag" content="Performance" />

The spec also defines profile and book, plus two verticals: music.song, music.album, music.playlist and music.radio_station, and video.movie, video.episode, video.tv_show and video.other. Anything outside that list is a custom type written as a CURIE such as my_namespace:my_type, with the namespace declared in a prefix attribute.

We prefer a simple rule: website for the home page and landing pages, article for every blog post. Hugo's built-in template makes a similar split, and the rule gives each post a machine-readable publish date for free.

What Is an OG Title? og:title and og:description vs Your Title Tag

og:title is the headline shown on the link card. It doesn't have to match your <title> element. The title tag often ends with a site-name suffix for browser tabs and search results, while og:title can drop it because og:site_name carries the brand separately.

Google's title link documentation lists content in og:title meta tags as one of several sources it may use when it writes a search result title. So a sloppy og:title can leak into search, which is one more reason to keep it clean and accurate.

og:description works the same way next to <meta name="description">. The plain description feeds search snippets, while og:description feeds the share card. Many sites use the same sentence for both, which is fine. Length guidance for writing them belongs to our meta description guide, so we won't repeat it here.

Open Graph Protocol on Facebook, X, LinkedIn and Chat Apps

Each platform reads the same tags a little differently.

Facebook. Meta's webmaster sharing guide lists og:url, og:title, og:description, og:image and fb:app_id as basic tags for all content, with og:type and og:locale as extras that help distribution. You only need fb:app_id if you want Facebook Insights for your domain. Meta's crawler identifies itself with a user agent that starts with facebookexternalhit.

X. X uses its own twitter: tags, written with name= instead of property=. Its card markup docs list og:title, og:description and og:image as the fallbacks for twitter:title, twitter:description and twitter:image. It also says a summary card may render when twitter:card is missing but og:type, og:title and og:description exist.

LinkedIn. LinkedIn's help center names og:title, og:image, og:description and og:url as the tags it needs for a link preview.

Chat apps. Many messaging apps that unfurl links read og: tags too, often alongside other page metadata. Each has its own order of preference, so test in the app you care about.

One combined block covers all of them:

<meta property="og:title" content="How We Cut Build Times" />
<meta property="og:description" content="Three changes that took our CI run from 14 minutes to 5." />
<meta property="og:image" content="https://example.com/cover.jpg" />
<meta property="og:url" content="https://example.com/blog/builds" />
<meta name="twitter:card" content="summary_large_image" />

Only twitter:card is X-specific here. X falls back to the og: values for the title, description and image, so you don't need to duplicate them.

Generating Open Graph Tags from Front Matter in Static Site Generators and WordPress

Few people type these tags by hand on every page. A static site generator reads each post's front matter and a template turns it into og: tags. A typical block looks like this:

---
title: How We Cut Build Times
description: Three changes that took our CI run from 14 minutes to 5.
image: /images/cover.jpg
date: 2026-11-11
---

The template then prints og:title from title, og:description from description, og:image from image (made absolute) and article:published_time from date. Our front matter guide covers the YAML syntax itself.

How each tool does it:

  • Jekyll: the jekyll-seo-tag plugin adds a {% seo %} tag to your layout. It outputs og:title, og:description, og:url, og:site_name, og:locale, og:type and, when you set image, og:image.
  • Hugo: the embedded opengraph.html partial maps title, description, images and the page dates to tags, using article for regular pages and website for list and home pages.
  • Next.js: the App Router's metadata object takes an openGraph field with title, description, url, siteName, images, locale and type.
  • WordPress: SEO plugins write the tags from each post's fields. If you draft posts in Markdown first, see our WordPress Markdown guide.

Here's the limitation: our editor's preview doesn't render front matter. A CommonMark parser shows the block as a horizontal rule and a heading, and it never produces <meta> tags. Write the body in Markdown, then check the tags in your built page.

How to Check Open Graph Tags: Open Graph Checker and Debugger Tools

An open graph checker requests your live URL the way a platform's crawler would and reports the og: values it found. Three are worth keeping handy:

  • Meta's Sharing Debugger: sign in with Facebook, paste the URL, and it lists every og: property Meta scraped, with warnings for missing or guessed values. Its Scrape Again button refetches the page, so it doubles as the refresh switch for an outdated Facebook card.
  • LinkedIn Post Inspector: shows the title, description, image and URL LinkedIn pulled from the page, which is the quickest way to confirm the four tags LinkedIn depends on.
  • curl with Meta's user agent: Meta's crawler docs suggest simulating a crawl by sending the facebookexternalhit/1.1 user agent. This shorter version keeps only the Open Graph lines:
curl -sL -A "facebookexternalhit/1.1" https://example.com/blog/builds | grep -o '<meta property="og:[^>]*>'

If that prints nothing while your browser's inspector shows the tags, the server isn't sending them to crawlers. That points straight at the first cause below.

When an open graph debugger reports missing tags you know are there, check these four things in order:

  1. Client-side rendering. JavaScript adds the tags after the page loads. The Next.js metadata docs put facebookexternalhit on their list of HTML-limited bots that can't run JavaScript, so the tags have to be in the server's HTML response.
  2. Relative URLs. og:image or og:url holds /cover.jpg rather than a full https:// address.
  3. Tags placed too late. A template drops them into the body, or broken markup ends the head early. Meta's crawler docs also say Open Graph properties must sit within the first 1 MB of the page or get cut off. Huge inline scripts above them can push them past that point.
  4. An old scrape. The platform is still showing what it cached last time. Refetch with Scrape Again or Post Inspector, and give a changed image a new file name, since Meta caches images by URL.

Testing how the image itself crops and displays is covered in the Open Graph image guide. If you'd rather start from a clean tag set, our meta tag generator builds the <meta> and og: tags in your browser for you to paste in. It doesn't crawl your live site, so use the debuggers above to check the result. To inspect the rest of the head, see how to check meta tags on any page.

Quick Answers on og: Tags, SEO and Image Size

The open graph protocol comes down to four required tags, a handful of optional ones and two rules: repeat a tag for arrays, and put structured properties after their root. Get those into your page's server-rendered head, check them in a debugger, and your links should preview the way you intend. Build the tags with our meta tag generator, and draft the article itself in our free Markdown editor.