No twitter:site handle
What Is This Issue
The twitter:site meta tag specifies the X (Twitter) username of the website or brand. This links your web pages to your official X account when content is shared on the platform.
This issue checks whether your page has the twitter:site tag implemented. A passing implementation must include:
twitter:site- The X handle of your website or brand (with or without @ symbol)
Example of passing implementation:
<meta name="twitter:site" content="@examplecompany" />Or:
<meta name="twitter:site" content="examplecompany" />Why Is This Important
The twitter:site tag is valuable for brand connection and social media integration:
- Brand linking: Connects shared content to your official X account
- Account attribution: X may display your account name alongside shared content
- Follow promotion: Makes it easier for users to find and follow your account
- Brand consistency: Maintains consistent branding across platforms
- Analytics: Helps track social sharing performance
Without the twitter:site tag:
- No connection between shared content and your X account
- Missed opportunity to promote your X presence
- Reduced brand visibility on X
Resolving this issue improves brand integration with X and contributes to a higher overall SEO health score by strengthening social media signals.
How XeoPix Detects This
XeoPix checks for the twitter:site tag by:
- Fetching the page HTML after following all redirects
- Parsing the
<head>section to extract the meta tag withname="twitter:site" - Validating presence: Checks that the
twitter:sitetag exists - Validating content: Ensures the tag has a non-empty value
- Flagging the issue if the tag is missing or empty
The detection is performed on the raw HTML response without JavaScript execution, matching how X’s crawler sees your pages.
How To Fix
-
Add the
twitter:sitetag to your HTML<head>section:- Use your official X handle (e.g., “@examplecompany” or “examplecompany”)
- Include the @ symbol for clarity (optional but recommended)
- Ensure the handle matches your actual X account
-
Verify your X account:
- Double-check that the handle is correct and active
- The account should represent your website or brand
-
Use consistently:
- Add this tag to all pages across your website
- Keep the same handle value site-wide
-
Test your implementation:
- Use X Card Validator to verify the site handle is detected
- Tweet your URL and check if your account is linked
What We Store
Storage Level
Page Level
Database Table / Prisma Model
SocialOpenGraphData
Stored Fields
| Field | Type | Description |
|---|---|---|
| twitterSite | String? | Twitter site handle (twitter:site) |
Detection Dependencies
- HTML Document
- Meta Tags (twitter:site)
Examples
Example 1: Missing Twitter Site Handle
Problematic state (what fails):
<meta name="twitter:card" content="summary_large_image" />
<!-- Missing twitter:site tag -->Corrected state (what passes):
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@examplecompany" />Example 2: Incorrect Twitter Handle
Problematic state (what fails):
<meta name="twitter:site" content="@nonexistent" />
<!-- Handle doesn't match actual account -->Corrected state (what passes):
<meta name="twitter:site" content="@examplecompany" />
<!-- Handle matches actual X account -->Example 3: Inconsistent Site Handle
Problematic state (what fails):
<!-- Page 1 -->
<meta name="twitter:site" content="@exampleco" />
<!-- Page 2 -->
<meta name="twitter:site" content="@example_company" />
<!-- Inconsistent handles across pages -->Corrected state (what passes):
<!-- All pages use consistent handle -->
<meta name="twitter:site" content="@examplecompany" />Unit Test
Test File
xeopix-crawling-v2/__tests__/seo-audit-checks/socialOpenGraph/issue-127-twitter-site-handle.test.js
Purpose
Validates that the crawler detects pages missing the twitter:site meta tag.
Tested Function
runSocialOpenGraph()
Issue Information
- Issue Number: 127
- Issue Code:
twitter_site_handle - Toggle Group:
socialOpenGraph
Test Scenarios
Positive Test Cases
twitter:siteis present (e.g.,@example) → no issue detected.
Negative Test Cases
twitter:siteis missing from the page → issue detected with message"Twitter site handle meta tag is missing".
Boundary Cases
No boundary cases exist in the test.
Edge Cases
- Empty HTML: The function handles an empty string without throwing.
Expected Outcome
Pass
The issue should not be reported when the twitter:site meta tag is present in the page HTML.
Fail
The issue should be reported when the twitter:site meta tag is missing.
Validation
- Correctly detects the absence of the
twitter:sitetag. - Does not report a false positive when
twitter:siteis present. - Handles empty HTML gracefully without crashing.
Related Production Files
xeopix-crawling-v2/toggleGroups/socialOpenGraph.jsxeopix-crawling-v2/issueCodes.js
Coverage Summary
- Covers present and missing
twitter:sitescenarios. - Includes resilience test for empty input.
References
- X Card Markup — X Developer
- X Card Validator — X Developer
- Best Practices for X Cards — X Developer