Open Graph tags: what they do for SEO and link previews
Open Graph tags don't affect rankings, but they control how your links look when shared. Here is what to set, what to skip, and how to test your previews.
Open Graph tags are small meta tags that tell social apps and chat tools how to show your link. They do not help you rank. Google has not said they are a ranking signal, and there is no good evidence that they are. They still matter, because a link with a clear title and image gets clicked more than a bare URL.
What Open Graph tags actually do
Facebook created the Open Graph protocol. Today, LinkedIn, Slack, Discord, WhatsApp, iMessage and many other apps read it. When someone pastes your URL, the app fetches the page, reads the tags in the head, and builds a preview card.
That is the whole job. The tags shape the card. They do not change what Google indexes or how it ranks the page. Treat them as a click-through tool for shared links, not an SEO tactic.
The tags worth setting
You only need a handful. Set these on every indexable page:
- og:title: the card headline. It can match your title tag or be a little shorter.
- og:description: one or two sentences. Many apps cut it off early, so put the point first.
- og:image: a full URL to a real image file. This does most of the work.
- og:url: the canonical URL of the page, so shares of different URL variants point to one place.
- og:type: use article for posts and website for the rest.
X (formerly Twitter) reads Open Graph tags as a fallback. Its own twitter:card tag still controls the card size, so add twitter:card with the value summary_large_image if you want a big image. The other twitter tags are optional.
Get the image right
Most broken previews come from the image. A few rules prevent nearly all of them.
- Use an absolute URL that starts with https. Relative paths often fail.
- Aim for a 1.91 to 1 ratio. A size of 1200 by 630 pixels is the common choice.
- Keep the file small. Large images can time out before the app finishes fetching.
- Keep key text away from the edges, since apps crop differently.
- Do not block the image in robots.txt. Preview bots need to fetch it.
Add og:image:alt as well. It gives screen readers a description of the card image. It also forces you to say what the image shows.
Common mistakes
Rendering tags with client-side JavaScript
Preview bots generally do not run JavaScript. If your tags are injected after the page loads, the card will be empty or wrong. Put the tags in the server-rendered HTML. The same rule applies to AI crawlers, which is covered in our guide to JavaScript rendering.
One image for every page
A site-wide default image is fine as a fallback. If every page uses it, every shared link looks the same, and people scroll past. Give important pages their own image.
Stale previews
Apps cache cards. If you fix a tag and the old card still shows, the cache is the cause. Facebook's Sharing Debugger and LinkedIn's Post Inspector let you refetch a URL. Other apps may take days to refresh, and some give you no tool at all.
Conflicting URLs
If og:url points somewhere different from your canonical tag, you send mixed signals. Keep both identical.
Do AI engines read Open Graph tags?
Possibly in small ways, but this is unproven. Some chat tools use the same tags to build link cards when a user shares a URL. Whether an AI answer engine uses og:title or og:description when it decides what to cite is not documented, so do not count on it. Your visible content and structured data are the safer investment.
How to test your previews
- View the page source, not the rendered DOM, and confirm the tags are there.
- Paste the URL into the Facebook Sharing Debugger and the LinkedIn Post Inspector.
- Share the link in Slack or a private chat and look at the card.
- Open the image URL on its own to confirm it loads without a login.
- Re-test after any template change, since one edit can drop the tags site-wide.
Your next step
Open your five most-shared pages and view source. Check that og:title, og:description, og:image and og:url are present in the raw HTML, and that the image loads. Fix those first. Then make sure your template generates the tags for every new page, so you never think about it again.