# Open Graph Meta Tags: og:title, og:type, og:url, og:image

> Open Graph protocol syntax, the four required og tags, optional tags and types, and how Facebook, LinkedIn and Google use them.

Open Graph tags are ` ` tags that describe a page for link previews: the title, type, URL and image. Facebook created the [Open Graph protocol](https://ogp.me/), and LinkedIn and Google also document their use of the tags. Add the four required tags, plus `og:description`, to each page that people share.

## Syntax

This example comes from the protocol site:

```html

The Rock (1996)

```

Open Graph tags use the `property` attribute, not `name`. The `prefix` attribute on the ` ` element declares the `og:` namespace.

## Required tags

| Tag | What it holds |
|---|---|
| `og:title` | The title of the object, for example "The Rock" |
| `og:type` | The type of object, for example `website` or `article` |
| `og:image` | The URL of an image that represents the page. Read the [og:image guide](/html-tags/og-image/) |
| `og:url` | The canonical URL of the page, used as its permanent ID |

## Optional tags

| Tag | What it holds |
|---|---|
| `og:description` | A description of one or two sentences |
| `og:site_name` | The name of the whole site, for example "IMDb" |
| `og:locale` | The language and territory, in the form `en_US` (the default) |
| `og:locale:alternate` | Other locales that the page is available in |
| `og:determiner` | The word before the title: `a`, `an`, `the`, `auto` or empty |
| `og:audio` | The URL of an audio file for the page |
| `og:video` | The URL of a video file for the page |

## Object types

The value of `og:type` sets the kind of object. The protocol says that pages without markup are treated as `website`. The `article` type adds its own properties: `article:published_time`, `article:modified_time`, `article:expiration_time`, `article:author`, `article:section` and `article:tag`. Other types are `book`, `profile`, `music.*` and `video.*`.

```html

```

If a tag has more than one value, repeat the tag. If tags conflict, the first tag in the page wins.

## Who reads the tags

1. Facebook. Meta's [webmaster guide](https://developers.facebook.com/docs/sharing/webmasters/) lists `og:url`, `og:title`, `og:description`, `og:image` and `fb:app_id` as the basic tags. Without them, the [Facebook crawler](/ai-crawler-bot/facebookexternalhit/) guesses the title, description and image.
2. LinkedIn. Its [help page](https://www.linkedin.com/help/linkedin/answer/a521928) lists `og:title`, `og:image`, `og:description` and `og:url` as tags that must exist.
3. Google. Google lists `og:title` as one source for [title links](https://developers.google.com/search/docs/appearance/title-link) and `og:site_name` as one source for [site names](https://developers.google.com/search/docs/appearance/site-names). Google can also use `og:image` to choose a preview image.
4. X. Its last published documentation said that X reads its own `twitter:` tags first and uses Open Graph tags when they are missing. Read the [Twitter card meta tags guide](/html-tags/twitter-card-meta-tags/).

## What Open Graph tags do not do

Open Graph tags do not do these things:

1. They do not control indexing. Use the [robots meta tag](/html-tags/meta-robots/) for that.
2. They do not make Google use your title. Google lists `og:title` with eight other sources for title links.
3. They do not change previews that already exist at once. Meta caches images by URL. Use the [Sharing Debugger](https://developers.facebook.com/tools/debug/) to make Facebook read the page again.

## Test the tags

Paste the page URL into the Facebook [Sharing Debugger](https://developers.facebook.com/tools/debug/). It shows the tags that the crawler reads, with errors and warnings. For LinkedIn, use the [Post Inspector](https://www.linkedin.com/post-inspector/).

---

[View the canonical page](https://aichatwatch.com/html-tags/open-graph-meta-tags/) · [Browse llms.txt](https://aichatwatch.com/llms.txt)
