> ## Documentation Index
> Fetch the complete documentation index at: https://docs.37audits.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Open Graph Auditor

> Validates that the page declares the Open Graph tags social platforms need to render a rich link preview

<Info>
  **SEO Auditor** — validates that the page declares the Open Graph tags social platforms need to render a rich link preview.
</Info>

<CardGroup cols={2}>
  <Card title="Social sharing" icon="share-nodes">
    Facebook, LinkedIn, Slack, WhatsApp and most chat apps build link previews from `og:*` tags.
  </Card>

  <Card title="Click-through" icon="image">
    A title, description and reachable preview image make shared links stand out and get clicked.
  </Card>
</CardGroup>

The [Open Graph protocol](https://ogp.me/) turns a web page into a rich object in a social graph through `<meta property="og:…">` tags. This auditor fetches the page with jsoup, collects every `og:`, `article:`, `music:`, `video:` and `book:` meta tag, verifies the four required properties, checks that `og:url` and `og:image` are absolute and consistent with the page, and probes the `og:image` URL to confirm it serves a supported image type.

## How it works

1. **Fetch** — requests the HTML with jsoup (including HTTP Basic Auth when provided). A fetch failure produces an `ERROR` response.
2. **Collect** — reads every `<meta>` whose `property` (or `name`) starts with `og:`, `article:`, `music:`, `video:` or `book:`, keeping document order and repeated values.
3. **Probe** — when `og:image` is an absolute URL, sends a `HEAD` request (falling back to `GET` on `405`) with a 5 second timeout and records the HTTP status and `Content-Type`.
4. **Rules** — missing `og:title`, `og:type`, `og:image` and `og:url` are separate FAILs. Empty optional tags, duplicated non-array properties, relative or off-host `og:url`, relative, unreachable or non-image `og:image`, and articles without `article:published_time` are WARNINGs.
5. **Aggregate** — `ERROR` wins, then `FAIL`, then `WARNING`; if every rule passes, the audit is `SUCCESS`.
6. **Specification pin** — every run emits `37A-OpengraphAuditor-100` (`INFORMATION`) naming the Open Graph protocol pinned to `https://ogp.me/`. That check does not change overall status.

## What it audits

Every row maps to one `checkRule*` method and one `CheckCode`. `37A-OpengraphAuditor-100` is emitted on every run, including fetch errors. Image rules `305` and `306` only run when `og:image` is absolute, and `306` is skipped when `305` fires. CheckCode suffixes use status ranges: `100` information, `200` success, `300–399` warning, `400–499` fail, `500–599` error.

| CheckCode | Status | When it fires | Recommendation | Why it matters |
| - | - | - | - | - |
| <a id="37A-OpengraphAuditor-100" />`37A-OpengraphAuditor-100` | `INFORMATION` | Every run. Records that this auditor implements the Open Graph protocol published at `https://ogp.me/`. | — (recommendation is `null`; nothing for the site to change) | — |
| <a id="37A-OpengraphAuditor-400" />`37A-OpengraphAuditor-400` | `FAIL` | `og:title` is absent or every value is blank. | Add `<meta property="og:title" content="…">` with the page title to `{url}`. | The title is the most visible part of a shared link. Without it, platforms guess from the page and the preview often shows a wrong or empty headline, so fewer people click. |
| <a id="37A-OpengraphAuditor-401" />`37A-OpengraphAuditor-401` | `FAIL` | `og:type` is absent or every value is blank. | Add `<meta property="og:type" content="website">` (or article, product, …) to `{url}`. | The type tells platforms what kind of object they are showing. Without it, some scrapers assume a generic website and others reject the preview, so shared links render inconsistently. |
| <a id="37A-OpengraphAuditor-402" />`37A-OpengraphAuditor-402` | `FAIL` | `og:image` is absent or every value is blank. | Add `<meta property="og:image" content="https://…">` pointing at a 1200×630 preview image to `{url}`. | Links shared without a preview image stand out far less in feeds and chats, so they are shared and clicked less than links that show one. |
| <a id="37A-OpengraphAuditor-403" />`37A-OpengraphAuditor-403` | `FAIL` | `og:url` is absent or every value is blank. | Add `<meta property="og:url" content="{url}">` (the canonical page URL) to `{url}`. | og:url is the identity of the page in the social graph. Without it, shares of the same page through different addresses are counted separately and previews may point at a tracking or duplicate URL. |
| <a id="37A-OpengraphAuditor-300" />`37A-OpengraphAuditor-300` | `WARNING` | An optional Open Graph tag (any tag other than the four required ones) has an empty `content`. One check per tag. | Fill the content attribute of `{property}` on `{url}` or remove the tag. | Platforms take an empty value as the final answer instead of falling back to the page, so the shared preview loses that detail and the link gets fewer clicks. |
| <a id="37A-OpengraphAuditor-301" />`37A-OpengraphAuditor-301` | `WARNING` | A property the protocol does not define as an array (`og:image`, `og:video`, `og:audio`, `og:locale:alternate`, `article:author`, `article:tag`, `book:author`, `book:tag`, `music:*`, `video:actor` and similar are exempt) is declared more than once. One check per property. | Keep a single `{property}` on `{url}` and remove the other `{count - 1}`. | When a property is repeated, each platform picks its own value, so the same link previews differently across networks and may show a title or description you did not intend. |
| <a id="37A-OpengraphAuditor-302" />`37A-OpengraphAuditor-302` | `WARNING` | `og:url` is present but not an absolute URL. | Set og:url on `{url}` to the canonical absolute URL, for example `"{resolved}"`. | Many scrapers cannot resolve a relative og:url, so the preview is attributed to the wrong address and likes and share counts are split across several URLs. |
| <a id="37A-OpengraphAuditor-303" />`37A-OpengraphAuditor-303` | `WARNING` | `og:url` is absolute and its host differs from the audited page host (skipped when `302` applies). | Point og:url at the canonical URL on `{pageHost}`, or audit `{ogUrlHost}` instead. | Platforms count shares and build the preview under the og:url host, so engagement is credited to another site and the preview can send visitors away from your page. |
| <a id="37A-OpengraphAuditor-304" />`37A-OpengraphAuditor-304` | `WARNING` | `og:image` is present but not an absolute URL. | Set og:image on `{url}` to an absolute https URL, for example `"{resolved}"`. | Many scrapers do not resolve a relative image path, so the shared link shows no picture and draws far fewer clicks. |
| <a id="37A-OpengraphAuditor-305" />`37A-OpengraphAuditor-305` | `WARNING` | The absolute `og:image` returned a non-2xx status or the request failed. | Make `"{ogImage}"` respond with HTTP 200 and a public image, or point og:image at a reachable URL. | When the image cannot be fetched, the shared link renders without a picture, and links without a preview image are shared and clicked far less. |
| <a id="37A-OpengraphAuditor-306" />`37A-OpengraphAuditor-306` | `WARNING` | The reachable `og:image` is not served as `image/jpeg`, `image/png`, `image/gif` or `image/webp` (skipped when `305` applies). | Serve `"{ogImage}"` as image/jpeg, image/png, image/gif or image/webp instead of `"{contentType}"`. | Platforms ignore an image they cannot decode, so the shared link renders without a picture and draws fewer clicks. |
| <a id="37A-OpengraphAuditor-307" />`37A-OpengraphAuditor-307` | `WARNING` | `og:type` is `article` (case-insensitive) and `article:published_time` is absent or blank. | Add `<meta property="article:published_time" content="<ISO-8601 date>">` to `{url}`. | Without a publication date, platforms and search engines cannot show when the article came out or rank it as fresh content, so it reaches fewer readers. |
| <a id="37A-OpengraphAuditor-500" />`37A-OpengraphAuditor-500` | `ERROR` | The page could not be fetched. | Make `{url}` reachable over HTTP(S) and re-run the audit. Last error was `"{error}"`. | — |
| <a id="37A-OpengraphAuditor-200" />`37A-OpengraphAuditor-200` | `SUCCESS` | Every rule above passed. Message is `Required Open Graph tags present on {url}: og:title "{title}", og:type "{type}", og:url "{ogUrl}", og:image "{ogImage}" ({contentType}); {foundCount} Open Graph tag(s) found.` | — | — |

## Output documentation

| Status | Description | Test logic |
| - | - | - |
| **SUCCESS** | The four required tags are present, `og:url` and `og:image` are absolute and consistent, and the image is reachable as a supported type | `og:title`, `og:type`, `og:image` and `og:url` all have a non-blank value and no warning rule fires (`200`). |
| **WARNING** | Previews will render, but some tags are weak or inconsistent | Empty optional tag (`300`); duplicated non-array property (`301`); relative `og:url` (`302`); `og:url` on another host (`303`); relative `og:image` (`304`); `og:image` unreachable (`305`); `og:image` not an image type (`306`); article without `article:published_time` (`307`). |
| **FAIL** | A required Open Graph tag is missing, so platforms fall back to guessing the preview | Missing `og:title` (`400`), `og:type` (`401`), `og:image` (`402`) or `og:url` (`403`). |
| **ERROR** | The auditor could not fetch the page | Page request threw (`500`). |
| **INFORMATION** | Specification pin | Always emitted (`100`); does not change overall status. |

## Risks and considerations

### Missing required tags

* Without `og:title`, `og:image` and `og:url`, platforms scrape the `<title>`, the first large image and the shared URL, which often produces a wrong or empty preview.
* `og:type` tells consumers how to treat the object (`website`, `article`, `product`, …); a missing type is treated as `website` by some scrapers and rejected by others.

### URLs and canonicalisation

* `og:url` is the canonical identity of the object in the social graph. A relative value or a value on a different host splits share counts and can point previews at the wrong site.
* Relative `og:image` values are not resolved by every scraper; use an absolute `https://` URL.

### Preview image

* The image must be publicly fetchable without cookies or authentication; a `403`, `404` or timeout leaves the preview blank.
* Serve JPEG, PNG, GIF or WebP with the matching `Content-Type`. HTML error pages or SVG returned under an image URL are ignored by most platforms.
* The auditor probes with `HEAD` first and retries with `GET` on `405`; servers that block `HEAD` with other status codes will warn.

### Repeated and empty tags

* The protocol allows arrays only for specific properties (`og:image`, `og:video`, `og:audio`, `og:locale:alternate`, `article:tag`, …). Repeating `og:title` or `og:description` is ambiguous; crawlers use the first value.
* An optional tag with an empty `content` is a leftover from a template and should be filled or removed.

### Articles

* `article:published_time` lets platforms and search engines show a date and order content; it is expected whenever `og:type` is `article`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.