How to use Open Graph (OG) meta tags
OG stands for Open Graph - a system Facebook came up with to make sure websites and apps "agree" on how to show links.
Open Graph tags are like sticky notes you add on your webpage saying, "Here’s the title! Here’s the photo! This is what my page is about!"
They’re just snippets of code you insert into the <head>
section of your site. For example:
<meta property="og:title" content="Why Cats Rule the Internet" />
<meta property="og:image" content="https://your-site.com/cat-meme.jpg" />
Why use OG tags?
- Social media: Without OG tags, your link might show up as a boring URL with a random thumbnail (or worse—nothing). With them, you control the preview’s title, image, and description.
- Google might use them: While Google prefers its own meta tags (like
title
anddescription
), it’ll occasionally borrow OG data if it’s missing or looks better. - First impressions: A polished preview makes people more likely to click. Imagine sharing a recipe link that shows a crispy pizza photo vs. a broken image icon. Which would you trust?
Required OG tags
- og:title: The headline you want people to see. Keep it catchy.
- og:description: A quick teaser. Think elevator pitch, not novel.
- og:image: The photo or graphic that’ll make people stop scrolling.
- og:url: The exact link to your page (prevents confusion if your site has duplicates).
You could add 10+ other tags (like og:type
for "article" or "video"), but start with these. They cover 95% of what you need.
How to use OG tags
- Plugins: If you’re on WordPress, tools like Yoast SEO or Rank Math auto-generate OG tags. Just fill in the fields.
- Test previews: Facebook’s Sharing Debugger lets you see how your link looks and fix issues.
- Images: Use high-quality pics (1200x630 pixels works best), and keep file sizes small so they load fast.
How are OG tags used by Google
Google mostly relies on its own system (like traditional meta description
), although if your OG tags are better written or more specific, Google might use them instead.
TL;DR: OG tags make your links look awesome on social media. Set them up once, forget about them, and watch your shares look less like spam. 🚀