Imagine you've created an amazing blog post or created a visually stunning product page. But when you share the link on social media, it appears with a generic title, a non-sense description, and no image. Not exactly the best thing!
This is where Open Graph (OG) tags come in. These tags act like a social media translator for web pages. They tell different platforms like Facebook, Twitter, and LinkedIn how to display your content when it's shared.
Adding OG tags is a relatively simple process. There are numerous online tools and plugins available to streamline the implementation on your website. However, it's important to remember that these tags reside in the code of your webpage. You can always check Open Graph website for the full list of supported tags but here is a list of tags that 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 OpenGraph but if it was a comprehensive guide, tags would look like this: