When someone shares your blog article on a social network, odds are it will appear with some descriptive text, images, and so on. If your blog lacks explicit instructions, in many cases these properties are just guessed-at and won’t be great.

I’ve seen a lot of blog authors and template creators go too far the other direction and add tons of redundant meta tags, which will make the page larger, heavier, and slower.

What’s the minimal necessary set of tags?

Most social media networks recognize various types of meta properties. Unfortunately, there’s a lot of redundancy amongst them. Fortunately, most of them also fall back to an open standard called the Open Graph protocol, so you can factor out the repetition.

For most blogs, and for the most popular social media for sharing informative articles (Twitter, Facebook, Google+, and LinkedIn), you need the following properties:

<meta name="og:type" content="article" />
<meta name="og:title" content="{content title, without site title}" />
<meta name="og:url" content="{permalink}" />
<meta name="og:image" content="{featured image}" />
<meta name="og:description" content="{description < 200 chars}" />
<meta name="og:site_name" content="{site title}" />

Some of these might seem redundant, but for example the URL is required for some services. In addition, for Twitter you’ll need the following:

<meta name="twitter:card" content="{desired card type}" />
<meta name="twitter:site" content="{your @username}" />

With those eight meta tags you’re all set for most content-related sharing. Other social media services, such as Pinterest, have additional tags they require, and sometimes processes you need to follow to be whitelisted.

All of the social media services have a) documentation and b) validators to preview how things will appear. Here are documentation links:

In many cases your content sharing instructions won’t be honored until you use the validator to check it. Checking triggers re-scraping and serves as a whitelisting process for several of the networks.

Image by Toban B on Flickr.

Done! Now Read These:

Help Me Make This Blog More Accessible

Please provide feedback on how I can make this blog more accessible

Digg Reader and Feedly, Two Great Google Reader Alternatives

Life without Google Reader is hard, but I'm hanging in there.

Xaprb now uses Hugo

The Xaprb blog is now using Hugo, a fast static site generator written in Go.