Open Graph Tags Explained

Open Graph tags are meta elements in a page's head that control how a link looks when shared. The protocol requires four: og:title, og:type, og:image and og:url. Each uses the property attribute, for example meta property="og:title" content="...". Add og:description, og:site_name and image width, height and alt for better previews.

The four required properties
PropertyWhat to put in it
og:titleThe title as it should appear in the share card
og:typeThe kind of object, such as website or article
og:imageA full URL to the preview image
og:urlThe canonical URL that identifies the page

Updated

Share previews come from a handful of tags that are easy to get subtly wrong: a relative image path, a missing width and height, or a title that only lives in the title element. Fill in the builder to get correct markup, then read what every property does.

Open Graph tag builder

Fill in the fields to generate the tags and a rough share card. Real apps each draw their own card, so treat the preview as a guide.

Every property, annotated

Optional and structured Open Graph properties
PropertyPurposeExample value
og:descriptionOne or two sentences under the titleSame-day roof repairs across Leeds
og:site_nameThe name of the overall siteNorthside Roofing
og:localeLanguage and territory, default en_USen_GB
og:locale:alternateOther languages the page exists infr_FR
og:determinerWord before the title in a sentencea, an, the, empty or auto
og:image:secure_urlhttps address for the imagehttps://example.com/og.jpg
og:image:typeMIME type of the imageimage/jpeg
og:image:widthWidth in pixels1200
og:image:heightHeight in pixels630
og:image:altDescription of the imageRoofer fitting slate tiles
og:video / og:audioA video or audio file to go with the pagehttps://example.com/tour.mp4

og:type values

Types defined by the protocol
ValueUse for
websiteHome pages and most other pages
articleBlog posts and news stories
profileA page about one person
bookA page about a book
music.song, music.album, music.playlist, music.radio_stationMusic pages
video.movie, video.episode, video.tv_show, video.otherVideo pages

Copyable examples

Complete set for a business page

Required tags first, then description, site name and the image block with its structured properties.

<meta property="og:title" content="Roof Repair in Leeds | Northside Roofing">
<meta property="og:type" content="website">
<meta property="og:url" content="https://northside.example/roof-repair">
<meta property="og:image" content="https://northside.example/og/roof-repair.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Roofer fitting slate tiles on a terraced house">
<meta property="og:description" content="Same-day leak repairs and free written quotes across Leeds.">
<meta property="og:site_name" content="Northside Roofing">
<meta name="twitter:card" content="summary_large_image">

Blog post with article tags

The prefix attribute declares the namespaces. Dates use ISO 8601.

<html prefix="og: https://ogp.me/ns# article: https://ogp.me/ns/article#">
<head>
  <meta property="og:type" content="article">
  <meta property="og:title" content="How to Spot Storm Damage on Your Roof">
  <meta property="og:url" content="https://northside.example/blog/storm-damage">
  <meta property="og:image" content="https://northside.example/og/storm-damage.jpg">
  <meta property="article:published_time" content="2026-10-02T09:00:00Z">
  <meta property="article:section" content="Maintenance">
  <meta property="article:tag" content="storms">
</head>

Structured properties belong to the tag above them

Properties such as og:image:width describe the most recent og:image declared before them. Order matters: declare the image first, then its width, height, type and alt, then the next image.

og:image:secure_url is an extra https address for the same image. If your og:image already uses https, you do not need it.

Types and their extra tags

website is the default for pages that are not a specific kind of object. article unlocks article:published_time, article:modified_time, article:author, article:section and article:tag.

The protocol also defines book, profile and the music and video groups. Use them only when the page really is that object; a product page is usually website.

How it works

  1. Fill in the title, description, page URL and image URL in the builder.
  2. Pick the type: website for most pages, article for blog posts.
  3. Check the rough preview card, then copy the generated tags into the head of your page.
  4. Test the live page with the platform's own sharing debugger, since each network caches previews.

Tips

Frequently asked questions

What size should an Open Graph image be?

The protocol does not set a size. 1200 by 630 pixels is a widely used landscape size and is the size the Next.js documentation uses in its examples. Keep important text away from the edges, since some apps crop the image.

Do Open Graph tags help SEO?

Their job is the share card, not ranking. A clear title and picture can earn more clicks when people pass your link around in chats and feeds. Keep og:title consistent with your title element so every surface describes the page the same way.

Why do Open Graph tags use property instead of name?

The protocol is built on RDFa, which uses the property attribute. The examples on ogp.me write meta property="og:title". Twitter card tags, by contrast, use the name attribute, as in meta name="twitter:card".

Do I still need Twitter card tags?

Add at least twitter:card, set to summary_large_image if you want the big picture layout. Many apps read the og values for title, description and image when matching twitter tags are absent, but platform rules change, so test your live URL before assuming the fallback works.

Can a page have more than one og:image?

Yes. The protocol allows arrays: repeat the og:image tag, and put each image's width, height and alt right after the image they describe. When values conflict, the protocol gives the first tag from the top preference.

Related: Open Graph preview, OG image generator, Meta tag generator, Meta tag checker, Next.js SEO checklist.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.

Product

Who It's For

Features

Resources

Company

View Sitemap