Open Graph (OG) tags are meta tags in the <head> of a page that tell social platforms how to render a link. Without them, Facebook, Twitter, and LinkedIn fall back to whatever they can scrape: usually the plain page title, a random slice of body text, and no image.
The tags come from the Open Graph protocol, which Facebook published in 2010 and other platforms adopted. Each one is a <meta> element with a property attribute that starts with og:.
og:image picks the picture shown next to your link. Without it, most platforms render a bare row of text.og:title sets the preview headline, and it can differ from the page's <title>.OG tags sit in the <head>, next to <title> and the standard description meta tag. Generators and CMS plugins can write them for you, but the output is still plain HTML you can read and edit. The Open Graph protocol site lists every supported tag. Here are the ones I usually use.
og:title: Defines the title that appears in the social media preview (ideally under 60 characters).og:type: Specifies the type of content being shared. Common types are:
article (for blog posts, news articles)website (for general websites)book (for books)product (for products)video (for videos)og:image: Provides the URL of a high-quality image (ideally at least 1200x630 pixels) that will be displayed in the social media preview.og:description: A concise (ideally under 200 characters) summary of your content that appears in the social media preview.og:url: The canonical URL of the web page being shared. (default: current page URL)og:site_name: The name of your website.og:locale: The language of the content.og:audio: URL to an audio file (if you have one).og:video: URL to a video file (if you have one).This post is just an introduction to Open Graph, but if it was a comprehensive guide, the tags would look like this:
<head>
<title>A Comprehensive Guide to Open Graph (OG) Tags</title>
<meta
name="description"
content="Master OG tags to enhance your social media sharing and engagement."
/>
<meta
property="og:title"
content="A Comprehensive Guide to Open Graph (OG) Tags"
/>
<meta property="og:type" content="article" />
<meta property="og:image" content="https://example.com/banner.jpg" />
<meta
property="og:description"
content="Learn everything you need to know about OG tags, from their importance to implementation."
/>
<meta property="og:url" content="https://www.example.com/your-article-page" />
</head>Once the page is live, run the URL through an Open Graph tags checker or the platform's own debugger. Platforms cache the first scrape they do, so a forced re-scrape is the fastest way to confirm the tags render the way you wrote them.
Occasional notes on software, tools, and things I learn. No spam.
Unsubscribe anytime.