Rule: twitter-card
The twitter:card meta tag controls how your link appears when shared on X (formerly Twitter). Without it, your link shows as a plain URL — no image, no title, no description. With summary_large_image, you get a full-width image card that dramatically increases engagement. This rule checks that the twitter:card tag is present.
What it checks
Indxel looks for a <meta name="twitter:card" content="..."> tag in the HTML head. The rule passes if the tag exists with a non-empty content value. Indxel does not validate that the value is one of Twitter's accepted types (summary, summary_large_image, app, player) — only that it's present.
Thresholds
twitter:card meta tag exists with non-empty content
twitter:card meta tag is missing or empty
Edge cases
Twitter falls back to Open Graph tags if twitter: tags are missing. But the fallback behavior is not guaranteed and the preview may not be optimal. Setting twitter:card explicitly gives you control.
In Next.js, the twitter field in metadata generates twitter:card and related tags. Setting twitter: { card: 'summary_large_image' } generates <meta name="twitter:card" content="summary_large_image">.
The twitter:card value must be one of: summary, summary_large_image, app, player. 'summary_large_image' is recommended for most pages — it shows a large image preview.
Twitter caches card data aggressively. After updating your twitter:card, use the Twitter Card Validator to force a refresh.
Configuration
// indxel.config.ts
import { defineSEO } from "indxel";
export default defineSEO({
rules: {
"twitter-card": true, // enabled by default
},
});
// Set twitter:card in Next.js metadata:
export const metadata = {
twitter: {
card: "summary_large_image",
title: "Page title for Twitter",
description: "Description for Twitter",
images: ["/og-image.png"],
},
};Frequently asked questions
What's the difference between summary and summary_large_image?
summary shows a small square thumbnail (120x120) next to the title. summary_large_image shows a full-width image (1200x630) above the title. For most pages, summary_large_image is better — it's more visually prominent and gets more clicks.
Do I need both twitter:card and og:image?
For best results, yes. Twitter can fall back to OG tags, but explicitly setting twitter:card gives you more control. Other platforms (LinkedIn, Slack, Discord) use OG tags exclusively. Set both for universal coverage.