You Don't Need twitter:title if You Have og:title

2023-04-24

TLDR: You can safely omit `twitter:title` if you have the same `og:title`. Why? Because Twitter falls back to the standard open graph tags.

Image for What are Open Graph Meta Tag?

What is the common practice?

We analyzed the internet for the most common tags. One thing that we noticed was that many sites seem to use the exact same twitter:title as og:title. We took a sample of 156 sits from HackerNews and analyzed their meta tags.

not sameog:title missingsametwitter:title missingcategory

Specifically we compared the og:title value with the twitter:title. What we observed is that two third (104) used the same exact value for og:title and twitter:title, and only 3 of them used different titles. As expected, many did also omit the twitter:title (47 of 156). Two of the tested links seemed to omit the og:title, which is a bit hard to understand considering the og: ones are the generic version and support by many more social media platforms.

If you want to run the test yourself, use this Elixir Livebook.

What does Twitter recommend?

Twitter does not specially recommend using the og:title tags. However, it is pointed out in the documentation that in case of missing twitter: tags the corresponding og: tags are used (read here).

twitter.webp

How is the practice?

We want to see how twitter displays the social media preview if the twitter:title is omitted.

We created two links: https://ogtester.com/share/zRy4Z and https://ogtester.com/share/KCeIB The first link contains only og:title, while the second one also has the twitter:title included.

twitter.webp Without twitter title
twitter.webp With twitter title

As you can see, twitter automatically falls back to the og:title. This shows, that you don’t need to duplicate your title in twitter:title.

Kiru picture
Kiru is a developer who has a history of creating successful projects. He is passionate about using his expertise in technology to make people's lives easier by making it more accessible.
Kiru
Kiru Logo