Sub topic 2
Description, Site Name, and Locale
Assume you know basic HTML, absolute URLs, and how HTTP clients retrieve a page. Social crawlers read the HTML response and use metadata in the document's <head> to build a preview.
Description, site name, and locale
og:description summarizes the page when the platform does not use visible page text. Keep it specific and useful. og:site_name identifies the larger website or product. og:locale identifies the page's language and regional convention, using an underscore such as en_US.
<meta property="og:description"
content="A simple method for smooth cold-brew coffee at home.">
<meta property="og:site_name" content="Example Kitchen">
<meta property="og:locale" content="en_US">Use one description per page. A shared generic description produces indistinct previews. If a page has translations, add alternate locales where supported, but keep the primary locale accurate.
Preview images: size, format, and alt text
The image often dominates a link preview. Use an absolute HTTPS URL and an image large enough for high-density screens. A common starting point is 1200 × 630 pixels, close to a 1.91:1 ratio. JPEG works well for photographs, while PNG suits sharp graphics or transparency. Keep important text away from the edges because platforms may crop the image.
<meta property="og:image"
content="https://example.com/images/cold-coffee-1200x630.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt"
content="A glass of cold brew coffee with ice on a wooden table">The og:image:alt value describes the image for accessibility. It does not replace the page description.
Twitter/X cards and Open Graph fallback
Twitter/X supports its own card metadata. Set twitter:card to summary_large_image when the page has a wide image. Twitter/X can use Open Graph values for the title, description, and image when matching Twitter-specific tags are absent.
<meta name="twitter:card" content="summary_large_image">
<meta property="og:title" content="How to Brew Cold Coffee">
<meta property="og:description"
content="A simple method for smooth cold-brew coffee at home.">
<meta property="og:image"
content="https://example.com/images/cold-coffee-1200x630.jpg">Adding twitter:title, twitter:description, or twitter:image gives platform-specific control, but duplicates values that Open Graph already supplies.
Exercise
What should you check first if a preview shows the wrong image?
Show answer
Check that the page has one correct absolute og:image URL, valid dimensions, and no earlier or conflicting image tag.