Skip to content
Koit Academy

Websites & SEO

·

8 min read

What Are Open Graph Tags? The Link Preview, Explained

What Open Graph tags are, the four every page needs, how social sites and messaging apps use them for link previews, and how to fix a wrong preview.

By Koit Academy

Paste a link into a chat or a social post and, a second later, a card appears: a title, a short description, often a picture. Nobody typed that card. The app fetched the page and read a handful of tags in its head that exist for exactly this purpose. When they are missing, the app guesses, and the guess is usually the site’s logo, the cookie banner text or nothing at all.

Those tags are Open Graph tags. They take a few minutes to add, and they decide how every shared link to the page looks for as long as the page exists.

Where Open Graph came from

The Open Graph protocol is a short specification for describing a web page as an object: what it is called, what kind of thing it is, which image represents it and what its permanent address is. It was created so social platforms could turn any page into a rich object in a feed, and it has since become the general standard for link previews. Messaging apps, chat tools, forums and most social platforms read it.

The tags are ordinary meta tags with a property attribute that starts with og:, placed in the page’s head. They change nothing about how the page looks to a visitor or how it ranks; they only describe the page to software that asks.

The four every page needs

The protocol names four properties as required for every page:

TagWhat it holdsExample
og:titleThe title as it should appear in the previewRoof Repair in Denver - Free Inspection
og:typeThe kind of objectwebsite, or article for a post
og:imageThe full URL of the image that represents the pagehttps://www.example.com/images/roof-repair.jpg
og:urlThe page’s canonical addresshttps://www.example.com/roof-repair/denver/

Beyond those, og:description adds the one or two sentences under the title, og:site_name names the larger site, and og:locale states the language and territory. For the image, the protocol also defines width, height and alt properties; the alt text describes what the image shows for people who cannot see it.

The meta tag generator writes the required tags and the description together with the title, meta description and canonical tags most pages need, escaped so a quotation mark in the text cannot break the HTML.

Open Graph and the search snippet are separate

It is easy to assume the title and description in a search result and the ones in a link preview are the same thing. They come from different tags and are read by different software:

  • Search results use the title element and may use the meta description, as Google decides.
  • Link previews use og:title and og:description when they are present, and fall back to the title element and meta description, or to text on the page, when they are not.

Often the same words work for both. Sometimes they should differ: a search title may lead with the keyword and the place, while a preview that will be seen in a friend’s message can read more like a headline. The SERP preview tool shows how the search versions fit the line before you decide whether the preview needs its own.

Website or article

The og:type tag says what kind of thing the page is. For most pages the right value is website. For blog posts and news stories, article is the usual choice, and the protocol defines a few extra article properties, such as its section and tags, for platforms that use them. Choosing the type does not change how the preview looks on most platforms, but it describes the page accurately for those that read it.

Writing the preview text

The preview title and description are read in a different setting from a search result. Nobody searched for anything; a friend or a colleague shared the link, and the card has to explain why it is worth opening. A few habits help:

  • Keep the title short enough to read at a glance. Cards are narrow, and long titles are cut.
  • Make the description finish the thought. One or two sentences that say what the reader gets.
  • Do not repeat the site name in the title if og:site_name already shows it.
  • Match the page. A preview that promises something the page does not deliver costs trust the next time a link from the site is shared.

The image does most of the work

In a feed or a chat, the picture is what people see first. A few practical points:

  • Use a full URL. A relative path such as images/share.png is resolved against the wrong base by some readers and ignored by others.
  • Give the dimensions. Facebook’s sharing guide for webmasters advises specifying the image’s height and width so it loads properly the first time a link is shared.
  • Make it readable small. Previews are often shown at thumbnail size. Text in the image should be large, short and high in contrast, or absent.
  • One image per page, chosen on purpose. Without og:image, apps pick whatever they find, which is how a site’s header logo ends up as the preview for every article.

Why a fixed preview still shows the old version

Platforms cache what they read. Change the title or the image on your page and the next share may still show the old card, because the platform is reusing what it fetched the first time. Facebook notes that images are cached by their URL and are not updated unless the URL changes, so the reliable way to replace an image is to publish it at a new address. Most large platforms also offer a debugging tool that fetches the page again on request; use it after fixing the tags.

Tag mistakes that spoil a preview

  • No og:url, or one that differs from the canonical. Shares of the same page through different addresses (with tracking parameters, for example) can be counted as different objects.
  • The same image on every page. A logo on every card tells nobody what the page is about.
  • A description copied from the first paragraph. It often starts mid-thought. Write one or two sentences for the purpose.
  • Tags added by both a theme and a plugin. Two og:title tags leave the reader to choose. View the page source and make sure each tag appears once.
  • Tags on a page that requires a login. If the app cannot fetch the page, it cannot read the tags. Public pages only.

Twitter cards

X, and a few services that copied its approach, read their own twitter: tags as well, but fall back to Open Graph for most of them. In practice one extra tag covers the difference: twitter:card, set to summary_large_image for a large picture or summary for a small one. The generator adds it alongside the Open Graph set.

When a plugin or theme writes the tags

Most site builders and content systems can write Open Graph tags for you, through the theme or a search plugin. That is usually the best place to manage them, because every new page gets a set automatically. Two things are worth checking once. First, that only one component writes them: a theme and a plugin both adding og:title is a common source of duplicate tags. Second, that the defaults are sensible: the fallback image when a page has none, and whether the description comes from a field you can edit or from the first words of the page.

Sharing a page that changes

Some pages change often: a price, a stock level, an event date. A preview made when the link was first shared may keep showing the old details for a while, because platforms reuse what they fetched. For pages like these, keep the time-sensitive detail out of og:title and og:description and put something that stays true, such as the product name and what it does.

A checklist for a new page

Before a page goes live, check that it has a title and description written for people, a canonical address, the four required Open Graph tags with a full image URL, and the twitter:card tag. Then share the link privately, to yourself, and look at the card it makes. If it is wrong, it is far easier to fix now than after the first hundred shares have been cached.

The same discipline applies to the page’s address, which appears in previews and is part of og:url; the URL slug generator keeps it short and readable. For the search side of the same work, how long should a meta description be covers the snippet under the title.

Sources, read November 14, 2026:

  • The Open Graph protocol, ogp.me: og:title, og:type, og:image and og:url as the required properties, the optional properties, and the og:image width, height and alt properties.
  • Meta for Developers, A Guide to Sharing for Webmasters: specifying image dimensions, and images cached by URL.