twitter:site handle is configured
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:
// 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:sitemeta tag ormetadata.twitter.siteproperty. This should be the@handleof 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:siteis set in at least the root layout with a@handlevalue. 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:siteproperty 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:siteattributes 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: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 — Twitter Cards — twitter:site tag
Taxons
History
- 2026-04-18·v1.0.0·Initial import from marketing-social-sharing·automated