Open Graph Tags

February 24, 2023

Search Engine optimization

Open Graph Tags

Open Graph meta tags act as a bridge between your website and social media, allowing you to customize how your URLs appear when shared on these platforms. By using Open Graph meta tags, you can give your audience a striking preview of what they'll find when they click through!

What are Open Graph tags?

In 2010, Facebook introduced Open Graph meta tags to facilitate sharing websites on its platform. Twitter and LinkedIn have since adopted Open Graph meta tags to improve the user experience.

When you paste a URL into a Facebook input field, you'll likely see a link preview. Before Open Graph meta tags, you had no control over how your link preview was displayed, and sometimes Facebook showed the wrong content.

Open Graphs meta tags help users optimize their link previews on social media, ensuring everyone always sees the essential information.

Why are Open Graph tags important?

Social media channels are a constant source of web traffic and conversions. With the right mix of strategy and design, you can convince users to click through to your website to learn more about your brand, make a purchase, and much more.

Open Graph meta tags enhance the link preview on your website, attracting the attention of your audience.

How to use Open Graph

Facebook lists 17 Open Graph tags in its official documentation, but only four are needed for Facebook to understand your website. You use the tags by placing them between the Insert -tags in the website's backend.

The four required tags are:

og:title – This is the title or heading of the page.

For example:

  • og:description – This is a 1-2 sentence snippet that summarizes the page content. Unlike a regular meta description tag, it has no effect on your SEO.Example:
  • og:image – This is the URL of the image that will be displayed with your content. Facebook recommends an image size of at least 1200 x 630 pixels, but smaller images will also be displayed. If you don't specify og:image, Facebook will try to guess which image to display for the page, which may result in the wrong image or no image being displayed at all. Example:
  • og:url – This determines which version of the URL is shared and what count is displayed on your AddThis share buttons. For example, https://www.mydomain.com and http://mydomain.com/ These are technically different URLs. If you set your og:url tag to https://www.mydomain.com Setting this ensures that this version of the URL is always shared and the number of shares increases accordingly. Example:

You can also use other OG tags, such as:

  • OG: audio (link an audio file to your post)
  • OG: determiner (state the word that appears before the title of the object in a sentence)
  • OG: site-name (specifies the website from which the object originates)

Twitter maps

If you're not yet familiar with Twitter Cards, you can use them to attach media files and add extra information to your tweets. This can be useful for increasing the visibility of your tweets and providing additional context to users who click through.

Although not identical, Twitter maps use the same Open Graph protocol and look similar to OGP tags. Implementing these tags makes it much easier to create Twitter maps without duplication issues.

Like Facebook's Open Graph tags, Twitter Cards allow you to stand out from the crowd of tweets. In short, they enable you to generate additional content from your 140-character tweet.

These will not automatically appear in users' feeds, but a small "Show summary" button will be added below the tweet.

You can use Open Graph tags to define the title, description, and image of your content, and to determine the content type of your page and the audience you want to reach.

Facebook Object Debugger

Facebook Debugger is a free online tool that allows you to control what other people see when your blog posts are shared on Facebook.

The debugger tool is essential for brands with Facebook pages, as blog posts or website previews sometimes don't display correctly when you share them.

For example, an older image might be displayed, or Facebook might use a random image from your article instead of the main image.

Facebook Debugger can inspect any website in seconds and generate a report detailing exactly why your previews are being published in a certain way. Using the information in this report, you can then make changes to your HTML code or tags to fix the problem.

Read on, and we will guide you step-by-step through the debugger tool so you can understand how to view, customize, and update your Facebook previews.

Some other Open Graph tags that are really worth checking out

Although you can generally get by with the basic tags, there are a few more that are worth adding:

  • og:description: A description of your page. Similar to... above:title Could this be the same as the Day of your website, unless you wish to present it differently.
  • og:locale: If you want to localize your tags, it's probably a good idea to specify the location. The format is... language_TERRITORY, where the default value en_US at a hunt.
  • og:site_name: The name of the entire website where your content is located. If you are on a page with a blog post, you might have a title that reflects the content. title of the blog post, whereby site_name the name of your blog.
  • og:video: Do you have a video that supports your content? Here's your chance to embed it. Add a link to your video using this tag.

Images in Open Graph

While adding an image as and: image While this should often suffice, sometimes it can be difficult to display the image correctly. If you are having problems, the Open Graph standard includes several image tags such as... og:image:url vs og:image:secure_url as well og:image:width and og:image:height.

Make sure you follow all the instructions and examples in the Open Graph documentation. Additionally, some social networks have image requirements. Twitter, for example, requires a 2:1 aspect ratio, a minimum size of 300×157 and a maximum size of 4096×4096, a file size under 5 MB, and an image in JPG, PNG, WEBP, or GIF format.

If you're still stuck, test your tags with the social network's tools to see if you can find the problem.

Testing your Open Graph tags

Fortunately, our preferred social networks also offer tools to help us troubleshoot our tags. Once you've confirmed that your tags are indeed appearing in your website's source code, you can preview how your website will look in the feed.

How to add Open Graph tags to a WordPress website

To add Open Graph tags to your WordPress website, we recommend using a plugin that adds these tags to each page for you, such as Yoast SEO or All in One SEO.

These and other SEO plugins allow you to set the essential Open Graph tags for each page, usually in the plugin's "Social" or "Sharing" options.

Here's how to check if your Open Graph tags are correct.

Once you've set your Open Graph tags, you can use Facebook's debugger to preview how your content will look when shared and to troubleshoot any issues. Simply enter your page's URL here and select "Get new scrape information."

Similar articles:

Request free SEO consultation

Enter your details and we will contact you 📅

    Increase your traffic!

    Analyze your website now ➜

    Switzerland Flag