Black Friday: 40% off your first year of any yearly plan. Ends December 1. See the deal

← Back to MightyShare

OG Tags: The Open Graph Meta Tags Every Page Needs

OG tags (Open Graph tags) are meta tags in your page's head that tell Facebook, LinkedIn, X, Slack and iMessage which title, description and image to show when someone shares your link.

Without them, every app guesses, and the guess is usually a bare link or a random logo from your page. In this post, I'll show you the tags that matter, copy and paste examples, and how to add them in WordPress. Let's get into it.

The OG Tags You Actually Need

Since you're likely here for the code, here's the full set most sites need:

<meta property="og:title" content="Your post title">
<meta property="og:description" content="One or two sentences about the page.">
<meta property="og:image" content="https://example.com/share-image.png">
<meta property="og:url" content="https://example.com/your-post/">
<meta property="og:type" content="article">
<meta property="og:site_name" content="Your Site">
<meta name="twitter:card" content="summary_large_image">
  • og:title: the headline in the preview. Keep it under about 60 characters so it doesn't get cut off.
  • og:description: the line under the title. Some apps hide it, so put the important part first.
  • og:image: the big picture, and the tag that matters most. Use a full https URL, not a relative path.
  • og:url: the canonical address of the page, so shares of different URL versions get counted together.
  • og:type: usually article for posts and website for your homepage.
  • og:site_name: your site's name, shown small on some networks.
  • twitter:card: tells X to show a large image instead of a small square thumbnail.

Optional Image Tags Worth Adding

<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Describe the image">

The width and height let Facebook show the image on the very first share, before it has downloaded and measured it. The alt text helps people using screen readers.

What Size Should the OG Image Be?

Use 1200 by 630 pixels, a 1.91:1 ratio, as a PNG or JPG under 5 MB. That one image works as a large card on Facebook, LinkedIn and X. Keep text and faces away from the edges, since some apps crop a little.

Do I Need Twitter Tags Too?

Mostly no. X falls back to your OG tags for the title, description and image. The one tag worth adding is twitter:card set to summary_large_image, because without it X may show a small thumbnail instead of the big image. The Twitter card guide covers the rest.

How to Add OG Tags in WordPress

You probably already have them. Yoast SEO, Rank Math, All in One SEO, SEOPress and The SEO Framework all add OG tags automatically, using your post title, excerpt and featured image. Check their social settings to set a default image for pages without a featured image.

If you don't use an SEO plugin, the free MightyShare plugin adds the OG and X image tags for you.

How to Test Your OG Tags

Paste your URL into our free OG image checker. It shows the Facebook, X, LinkedIn and iMessage previews, lists every tag it found, and flags problems like a missing image, a tiny image or a title that will be cut off.

One thing worth knowing: networks cache previews. If you fix your tags and an old preview still shows, see how to clear LinkedIn's cache, or re-scrape the page in Facebook's Sharing Debugger.

Make Every OG Image Without Designing It

The tag is the easy part. Making a good 1200 by 630 image for every single post is the work. MightyShare generates one automatically from your post title, featured image, colors and logo, and plugs it into the OG tags your SEO plugin already outputs. The first 50 images every 30 days are free. Try it free.