Boost Ventilator Boost Ventilator - 28 days ago 7
HTML Question

Combining the meta description and Open Graph Protocol description into one tag

Is it possible to combine the meta description and Open Graph Protocol description…

<meta name="description" content="My meta description copy." />
<meta property="og:description" content="My meta description copy." />


…into one when they contain the same content?

<meta name="description" property="og:description" content="My meta description copy." />

Answer

Yes, you can combine them. To test it, I made the simple HTML page below, uploaded it to a server, then ran the page through Facebook's URL Linter. It reported no warnings related to the description tag (only about the missing og:image tag) and correctly read the description.

<!doctype html>
<html>
    <head>
        <meta name="description" property="og:description" content="My meta description copy." />
        <meta property="og:title" content="Test page" />
        <meta property="og:type" content="article" />
        <meta property="og:url" content="http://example.com/ogtest.html" />
    </head>
    <body>
    Test
    </body>
</html>

Note that, if the og:url value is different to the current page url, Facebook will look for a description on that url instead of the current one and ignore the current page's description tag.

It might also interest you to know that, even though it's possible to combine the two description tags, Facebook doesn't do this on their own website.

Comments