# twitter:site handle is configured

- **Pattern:** `ab-001814` (`marketing-social-sharing.twitter-cards.twitter-site-handle`)
- **Severity:** medium
- **Lifecycle:** active
- **Last modified:** 2026-04-18
- **Canonical URL:** https://auditbuffet.com/patterns/ab-001814
- **License:** CC-BY-4.0 — attribute to AuditBuffet Pattern Catalog (https://auditbuffet.com/patterns/ab-001814)

## Why it matters

The `twitter:site` tag attributes shared content to your site's Twitter/X account. When someone shares a page from your site, Twitter can display the site's account handle below the card, providing viewers a direct path to follow your account from within the share. Without it, the card is anonymous — there is no account context, no follow prompt, and no attribution signal that accrues to your account. Per the Twitter Cards spec, `twitter:site` is the mechanism by which shares generate account-level visibility. For any project that uses Twitter/X as a distribution channel, omitting this tag means every share generates awareness without routing that awareness back to the account.

## Severity rationale

Medium because missing twitter:site forfeits account attribution and follow opportunities on every share, reducing the compounding account-growth effect of social distribution.

## Remediation

Add `twitter.site` with your site's Twitter/X handle to the root layout metadata:

```ts
// app/layout.tsx
export const metadata: Metadata = {
  twitter: {
    card: 'summary_large_image',
    site: '@yourhandle',
  },
}
```

The handle must include the `@` prefix. This applies globally and does not need per-page overrides unless specific pages should attribute to a different account (e.g., an individual author's handle on their profile page).

## Detection

- **ID:** `twitter-site-handle`
- **Severity:** `medium`
- **What to look for:** Check for `twitter:site` meta tag or `metadata.twitter.site` property. This should be the `@handle` of the site's Twitter/X account. Check root layout metadata first, then page-level overrides. Count all instances found and enumerate each.
- **Pass criteria:** `twitter:site` is set in at least the root layout with a `@handle` value. The implementation must be verifiable by examining the codebase and must handle the documented requirements completely. At least 1 implementation must be confirmed.
- **Fail criteria:** No `twitter:site` property found anywhere in the project metadata.
- **Skip (N/A) when:** The project's documentation, README, or config shows it's an internal tool, API project, or developer library not intended for public social promotion.
- **Detail on fail:** `"twitter:site handle not configured — shared links won't attribute content to the site's Twitter/X account"`
- **Remediation:** `twitter:site` attributes shared content back to your site's Twitter/X account. When someone shares your content, Twitter can show the account context below the card. Add it to your root layout:

  ```ts
  export const metadata: Metadata = {
    twitter: {
      card: 'summary_large_image',
      site: '@yourhandle',
    },
  }
  ```

  If the project does not have a Twitter/X account, skip this — it is not required for cards to function.

## External references

- external twitter-cards — https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup

Taxons: findability

HTML version: https://auditbuffet.com/patterns/ab-001814
