Skip to content

Check your Open Graph tags

| Luke Harris
Cover image

I had a strange issue with this site and any site based off the template I use. When crawling the sites in Ahrefs, I got errors mentioning "Open Graph tags missing".

My Open Graph tags and other social tags are set in a component, social-meta.njk, for easy updating of just the tags across the site. Turns out the code in that component was using the incorrect syntax for Open Graph tags.

Here's the code:

<meta name="og:title" content="Check your Open Graph tags | Luke Harris">
<meta name="og:description" content="Make sure your Facebook and LinkedIn posts look the way they&#39;re supposed to.">
<meta name="og:image" content="https://luke.work/blog/2021/06/open-graph/images/tag.jpg">
<meta name="og:url" content="https://luke.work/blog/2021/06/open-graph/">
<meta name="og:site_name" content="Luke Harris">
<meta name="og:locale" content="en_US">
<meta name="og:type" content="website">

What's the issue?

Open Graph uses the property syntax instead of the name syntax of other meta tags, like description or title, according to Facebook's Open Graph docs.

My tags were using the name syntax instead.

The fix: update name to property:

<meta property="og:title" content="Check your Open Graph tags | Luke Harris">
<meta property="og:description" content="Make sure your Facebook and LinkedIn posts look the way they&#39;re supposed to.">
<meta property="og:image" content="https://luke.work/blog/2021/06/open-graph/images/tag.jpg">
<meta property="og:url" content="https://luke.work/blog/2021/06/open-graph/">
<meta property="og:site_name" content="Luke Harris">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="website">

Conclusion and resources

I deleted my Facebook account last year. However, updating my Open Graph tags means sharing my posts on LinkedIn works now 😅

LinkedIn has a great Open Graph tags checker. I also use Hey Meta.

I make websites that bring results.

Hi! I'm Luke Harris, and I'm a web designer in Corpus Christi, Texas.

I make websites for businesses and organizations who want to rapidly reach new customers.