Open Graph is a protocol developed to control how web pages are displayed when shared on social media platforms. It allows website owners to define what title, description, image, and other metadata should appear in link previews.
The system is widely used by platforms such as Facebook, LinkedIn, X (Twitter), and messaging apps that generate rich link previews.
Table of Contents
How Open Graph works
When a user shares a link, social platforms scan the page’s HTML for Open Graph meta tags. These tags provide structured information that defines how the preview should look.
If Open Graph tags are not present, platforms will try to guess the content automatically, which may result in incorrect or poorly formatted previews.
Basic Open Graph tags
The most common Open Graph tags include:
og:title– the title of the pageog:description– a short description of the pageog:image– image shown in the previewog:url– canonical URL of the page
Example:
<meta property="og:title" content="Page Title" />
<meta property="og:description" content="Page description" />
<meta property="og:image" content="https://example.com/image.jpg" />
<meta property="og:url" content="https://example.com/page" />
Why Open Graph is important
Open Graph improves how content appears when shared by:
- making links more visually attractive
- increasing click-through rates
- improving brand recognition
- ensuring consistent preview formatting
Optional Open Graph extensions
In addition to basic tags, you can also define:
og:type– type of content (website, article, product, etc.)og:site_name– website nameog:locale– language/region settings
These help platforms better understand and categorize your content.
Where Open Graph is used
Open Graph is supported by many platforms, including:
- social media networks
- messaging apps
- link preview generators
- content sharing tools
Summary
Open Graph is a metadata protocol that allows websites to control how their content appears when shared online. By adding Open Graph tags, you ensure that shared links display correctly with the right title, image, and description, improving visibility and engagement.