All rules
optional
Rule: twitter-cardWeight: 4/100

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.

Run the check
$ npx indxel check
Look for twitter-card in the output

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

PASS

twitter:card meta tag exists with non-empty content

WARN

twitter:card meta tag is missing or empty

Edge cases

1

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.

2

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">.

3

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.

4

Twitter caches card data aggressively. After updating your twitter:card, use the Twitter Card Validator to force a refresh.

Configuration

indxel.config.ts
// 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.

Related rules

og-image

critical — 8/100

og-title

optional — 4/100

og-description

optional — 4/100

Validate your SEO now

$npx indxel check
Get startedBrowse all rules
Indxel

SEO validation that runs in your terminal and blocks bad deploys.

GitHubnpm

Product

  • Documentation
  • Pricing
  • Plus Plan
  • CI/CD Guard
  • Indexation
  • Free Tools
  • Blog

Comparisons

  • vs Semrush
  • vs Ahrefs
  • vs Moz
  • vs Screaming Frog
  • All comparisons

Integrations

  • Vercel
  • GitHub Actions
  • Netlify
  • Docker
  • All integrations

Resources

  • Frameworks & use cases
  • Next.js
  • For freelancers
  • For agencies
  • SEO Glossary

Built with care. MIT Licensed.

PrivacyTermsLegalContact