Generate and preview HTML meta tags to optimize website social sharing.
When you paste a link into iMessage, WhatsApp, or Slack, the app doesn't just show the raw URL. It instantly fetches a beautiful "preview card" with an image, a bold title, and a description. How does it know what image and text to use?
In 2010, Facebook introduced the Open Graph (OG) protocol to solve this exact problem. By adding specific <meta property="og:..."> tags to the <head> of your HTML, you can explicitly tell social media scrapers exactly which metadata represents that specific page.
For example, <meta property="og:image" content="https://example.com/thumbnail.png"> dictates the exact image to use on the preview card.
Because the OG protocol was so effective, nearly every other platform (LinkedIn, Discord, Slack, iMessage) adopted it as the defacto standard for link previews.
Twitter created their own set of tags (twitter:card, twitter:image), but they are designed to fall back to reading your og: tags if the specific Twitter tags are missing. Properly configuring these tags is arguably the single most important step for social media distribution and click-through rates.
What is the primary purpose of Open Graph (og:) meta tags?