Sub topic 5
Description, Site Name, and Locale
This chapter covers three descriptive Open Graph properties: og:description, og:site_name, and og:locale. It assumes you can read basic HTML, know that meta tags go in the head, and have already added the four core properties (og:title, og:type, og:url, og:image).
What these properties add
The core properties identify the page. The descriptive properties shape how the preview card reads. They are optional in the Open Graph protocol, but most platforms show them when they are present.
| Property | Purpose | Example value |
|---|---|---|
| `og:description` | One or two sentences summarizing the page | `A simple method for smooth cold-brew coffee at home.` |
| `og:site_name` | Name of the whole site, not the page | `Daily Grounds` |
| `og:locale` | Language and region of the content | `en_US` |
og:description
og:description is a short summary of the page. Platforms show it under the title, and many cut it off. The cut-off point depends on the platform and the card layout, so put the key information first.
Practical guidelines:
- Aim for roughly 100 to 200 characters. Longer text is usually truncated.
- Write it for a reader who has not seen the page. Say what they will get by clicking.
- Do not repeat the title word for word.
- Use plain text. Markup in the value is not rendered.
If you omit og:description, some platforms fall back to the standard <meta name="description"> tag, and some show no summary. Do not rely on the fallback. Set both tags. They can hold the same text, or the Open Graph version can be written to read well in a feed.
og:site_name
og:site_name names the site that hosts the page. The title says what this page is. The site name says where it lives. For example, the title can be "How to Brew Cold Coffee" and the site name "Daily Grounds".
Use the same value on every page of the site. Do not put the page title in it, and do not add a tagline. Some platforms show it as a small label near the link domain. Others ignore it. It is harmless where it is not shown.
og:locale
og:locale states the language and territory of the page content. The format is language_TERRITORY, with a lowercase language code, an underscore, and an uppercase territory code. Examples are en_US, en_GB, fr_FR, and pt_BR. The default is en_US, so you only need to set it when your content is in another language or when the regional variant matters.
Note that og:locale uses an underscore, while the HTML lang attribute uses a hyphen (en-US). Do not copy one format into the other.
If the same page exists in other languages, list them with og:locale:alternate. Add one tag per language.
Putting it together
The example below extends the minimal set from the earlier chapter with the three descriptive properties.
<head>
<meta charset="utf-8">
<title>How to Brew Cold Coffee</title>
<meta property="og:title" content="How to Brew Cold Coffee">
<meta property="og:type" content="website">
<meta property="og:url" content="https://example.com/cold-coffee">
<meta property="og:image" content="https://example.com/images/cold-coffee-1200x630.jpg">
<meta property="og:description" content="A simple method for smooth cold-brew coffee at home.">
<meta property="og:site_name" content="Daily Grounds">
<meta property="og:locale" content="en_US">
<meta property="og:locale:alternate" content="fr_FR">
<meta property="og:locale:alternate" content="es_ES">
</head>Each tag uses the property attribute, as with the core tags. The values are plain strings, so any quote or angle bracket in them must be escaped. The dynamic generation chapter shows how to do that in code.
Common errors
- Using
nameinstead ofproperty.<meta name="og:description" ...>works on some parsers, but the protocol specifiesproperty. Usepropertyto stay compatible. - Hyphen in the locale.
en-USis not a validog:localevalue. Useen_US. - A description that is too long. The card cuts it off, and the important part may be lost.
- A different site name on each page. The label then looks inconsistent across shared links.
- Stale text after an edit. Platforms cache previews. A corrected description may not appear until the cache is refreshed. The testing chapter covers that.
Exercise
A French-language page at https://example.com/fr/cafe-froid is also available in English. Which two tags declare the page language and point to the English version's locale, and what is the exact value format?
Show answer
Use <meta property="og:locale" content="frFR"> for the page itself and <meta property="og:locale:alternate" content="enUS"> for the English version. Locale values use language_TERRITORY with an underscore, not a hyphen.
Exercise
A page sets og:site_name to "Cold Coffee Guide: Brew Better at Home Today" on one page and "Daily Grounds" on others. What is wrong, and what should you change?
Show answer
The site name should be the same on every page and should name the site, not the page or a tagline. Change it to "Daily Grounds" on every page.