What are Open Graph meta tags?

Open Graph meta tags are snippets of code that control how URLs are displayed when shared on social media. This protocol was created by Facebook to standardize the use of metadata to represent the content of a page in a short format.

You can find meta tags in the <head> section of a webpage like in this example:

<meta property="og:title" content="Airbnb - Vacation Rentals, Homes & Places" />
<meta property="og:description" content="Find adventures nearby and access unique homes and places around the world." />
<meta property="og:image" content="https://www.airbnb.com/images/logo.png" />

Why is this important to my website?

Open Graph tags are used by services like LinkPreview to extract the data and create a snippet when someone shares a link on social media or sends you a link through a messaging app like WhatsApp, Facebook Messenger, Slack, or Telegram.
As a result, the link to your web page will become a rich preview on someone's feed which in turn leads to more engagements and clicks.

What if I don't have meta tags on my page?

LinkPreview service will look into the HTML content of your web page and try to guess what information to use. This can produce bad or inaccurate link previews, missing content, or a bad preview image. This will also look bad if this web page is shared on Twitter, Facebook, or other social media websites.

How to set up Open Graph meta tags?

The Open Graph tags must be added to the <head> section of every web page. If you are using WordPress, you can use a plugin like Yoast to manage these tags.

To verify your meta tags, and to check if they are detected correctly, go to our debugging tool, enter your URL, and click submit to see the results.

Image size and formats

The og:image meta tag is probably the most important one. You should follow these few simple rules to avoid problems:

  • Make sure the image URL starts with https://
  • Do not use relative URLs
  • Use jpg, png, gif, or webp image format, do not use vector images or animations
  • The image dimensions should be at least 300x200 pixels
  • The image size should not exceed 5MB