You publish a great article, share the link on LinkedIn, and the preview shows your cookie banner text, a cropped logo and a title that cuts off halfway. Or worse, no image at all. That little preview card is often the first impression people get of your content, and it is controlled almost entirely by a handful of lines in your page's HTML called Open Graph tags.
This guide explains what Open Graph tags are, which ones matter, how to add them, and how to fix social share previews that refuse to update.
What are Open Graph tags?
Open Graph is a protocol originally introduced by Facebook that lets a web page describe itself to social platforms. It uses <meta> tags in the page's <head> section with names that start with og:.
When someone pastes your URL into Facebook, LinkedIn, Slack, WhatsApp, iMessage, Discord or many other apps, the platform fetches your page, reads those tags, and builds the preview card from them. If the tags are missing, the platform guesses, and its guesses are often poor.
Open Graph tags don't directly affect your Google rankings. Their value is in click-through: a clear, attractive preview gets more clicks, shares and visits than a broken one.
The essential Open Graph tags
Here are the tags every page should have:
<meta property="og:title" content="How to Choose a Domain Name for Your Business">
<meta property="og:description" content="Practical tips for picking a short, memorable domain name that fits your brand.">
<meta property="og:image" content="https://example.com/images/domain-name-guide.jpg">
<meta property="og:url" content="https://example.com/blog/choose-domain-name/">
<meta property="og:type" content="article">
<meta property="og:site_name" content="Example Co">
What each does:
- og:title: the headline shown in the card. It can differ from your SEO title, so you can make it more conversational.
- og:description: one or two sentences under the title. Some platforms show it, some trim it, some hide it.
- og:image: the preview image. This is the single most important tag for engagement.
- og:url: the canonical URL of the page, so shares of variations (with tracking parameters, for example) are grouped together.
- og:type: usually
websitefor your homepage andarticlefor blog posts. - og:site_name: your brand or site name.
Optional but useful:
- og:image:alt: alternative text describing the image, helpful for accessibility.
- og:image:width and og:image:height: help platforms render the image without fetching it first.
- og:locale: such as
en_US.
X (Twitter) card tags
X reads Open Graph tags as a fallback, but it also has its own twitter: tags. The most important is the card type:
<meta name="twitter:card" content="summary_large_image">
summary_large_image shows a big image above the title, while summary shows a small square thumbnail. If you don't set twitter:title, twitter:description or twitter:image, X will typically use your Open Graph values.
Getting the og:image right
Most preview problems come down to the image. Follow these guidelines:
- Use a landscape image around 1200 x 630 pixels. This 1.91:1 ratio is widely recommended and works well on most platforms.
- Keep important content in the center. Some apps crop to a square or a narrower shape, so text near the edges may get cut off.
- Use an absolute URL starting with
https://, not a relative path like/images/photo.jpg. - Keep file sizes reasonable. Large files may load slowly or be rejected. JPG or PNG are the safest formats. See our guide to optimizing images for the web.
- Make sure the image is publicly accessible. If it's behind a login, blocked by a firewall rule or hotlink protection, platforms can't fetch it.
- Avoid tiny text. Previews often display small on phones. A short headline in large type works; a paragraph doesn't.
A consistent branded template for blog images, such as your logo plus the post title on a colored background, makes your shares instantly recognizable.
How to add Open Graph tags
On WordPress
Most popular SEO plugins add Open Graph and X card tags automatically, using your post title, excerpt and featured image. Look for a "Social" tab in the plugin's settings on each post, where you can override the title, description and image for social sharing.
A few tips:
- Set a default fallback image in the plugin's settings so pages without a featured image still get a decent preview.
- Avoid running two plugins that both output Open Graph tags. Duplicate or conflicting tags confuse platforms. View your page source and search for
og:titleto check.
On website builders
Site builders usually have a "Social sharing" or "SEO" panel on each page where you can set the share image and text.
On hand-coded sites
Add the tags inside the <head> section of each page's HTML. For sites built with templates or static site generators, set them in the layout template and fill in the values from each page's data.
How to test and fix social share previews
Platforms cache previews, sometimes for a long time. If you change an image and the old one keeps appearing, you need to force a refresh.
- Facebook Sharing Debugger: paste your URL, see exactly which tags Facebook reads and any warnings, then click "Scrape Again" to refresh the cache.
- LinkedIn Post Inspector: shows how LinkedIn sees your page and refreshes its cached preview.
- Messaging apps and others: many don't offer a debugger. Adding a harmless query string, such as
?v=2, to the URL you share can force a fresh fetch, though it creates a slightly different link. - Third-party preview tools: several free sites show mockups of your preview across platforms at once.
Common problems and fixes
- Wrong or no image: check that
og:imageis present, is an absolute HTTPS URL, and loads in a private browser window. - Old title or image still showing: re-scrape in the platform's debugger.
- Preview shows random page text: you're missing
og:description, so the platform pulled text from the page. - Image is cropped badly: switch to 1200 x 630 and center your content.
- Nothing loads at all: your server may be blocking the platform's crawler, or the page may be returning an error. Security plugins and firewalls occasionally block social crawlers, so check their logs.
- Mixed content warnings: make sure the image URL uses HTTPS, as explained in our guide to fixing mixed content.
A quick Open Graph checklist
- ☐ og:title, og:description, og:image, og:url and og:type on every page
- ☐ Image around 1200 x 630, under a reasonable file size, publicly accessible
- ☐ twitter:card set to summary_large_image
- ☐ A default fallback image set sitewide
- ☐ No duplicate tags from multiple plugins
- ☐ Previews tested in the Facebook and LinkedIn tools
Wrapping up
Open Graph tags are small, but they decide how your content looks everywhere it gets shared. Set a clear title, a short description and a well-sized image for every important page, test with the platforms' debugging tools, and re-scrape when you make changes. It takes a few minutes per page and can make every share of your content work harder.