Free tool

Meta tag generator: copy-ready <head> tags and Next.js metadata

A page needs five things in its <head> to look right in Google and in social shares: a title, a meta description, a canonical URL, a robots directive when it shouldn't be indexed, and Open Graph tags with an image. Fill in the fields below to get copyable HTML or a Next.js metadata export, with pixel-width and length warnings as you type.

Updated

Search

Keyword first, brand last. About 50–60 characters.

About 120–160 characters. Front-load the key point.

Social (Open Graph and X)

Absolute URL to a PNG or JPEG, ideally 1200×630.

Output

Paste inside <head>

<title>Cookie-Free Web Analytics with Revenue Attribution | Example</title>
<meta name="description" content="See which channels bring paying customers, not just visitors. One script tag, no cookie banner, and revenue by source and campaign in minutes." />
<link rel="canonical" href="https://example.com/features/analytics" />
<meta name="robots" content="max-image-preview:large" />
<meta name="theme-color" content="#0E0E0D" />

<!-- Open Graph -->
<meta property="og:type" content="website" />
<meta property="og:title" content="Cookie-Free Web Analytics with Revenue Attribution | Example" />
<meta property="og:description" content="See which channels bring paying customers, not just visitors. One script tag, no cookie banner, and revenue by source and campaign in minutes." />
<meta property="og:url" content="https://example.com/features/analytics" />
<meta property="og:site_name" content="Example" />
<meta property="og:image" content="https://example.com/og/analytics.png" />
<meta property="og:image:alt" content="Dashboard showing visitors and revenue by channel" />

<!-- X / Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Cookie-Free Web Analytics with Revenue Attribution | Example" />
<meta name="twitter:description" content="See which channels bring paying customers, not just visitors. One script tag, no cookie banner, and revenue by source and campaign in minutes." />
<meta name="twitter:image" content="https://example.com/og/analytics.png" />
<meta name="twitter:image:alt" content="Dashboard showing visitors and revenue by channel" />
Title (desktop)60 chars · ~559 / 600px
Description (desktop)142 chars · ~897 / 920px

Checks

  • OK: Title fits on desktop (559 of ~600px).
  • OK: Description fits on desktop (897 of ~920px).
  • Note: The description fits on desktop but will be cut on mobile. Put the important part in the first ~110 characters.

Key takeaways

  • Title and description are cut by pixel width, not characters: roughly 600px for a desktop title and 920px for a description. The meters use the same Arial measurements as the SERP snippet preview.
  • Use an absolute, https canonical URL without tracking parameters, and point it at the page itself unless it really is a duplicate.
  • index, follow is the default. Only add a robots meta tag when you want something else, such as noindex for thank-you pages or internal search results.
  • Open Graph tags (og:title, og:description, og:image) control the link card on LinkedIn, Facebook, Slack and X. X falls back to them when twitter: tags are missing.
  • In the Next.js App Router, metadata goes in an exported metadata object, and theme color goes in a separate viewport export.

Which meta tags does a page actually need?

Most of what you see in old meta tag generators is dead weight. Google ignores the keywords meta tag, and has said so for years. What still does work is a short list, summarized below. Everything else (author, generator, revisit-after) can go.

TagWhat it doesNeeded?
<title>The headline of your search result and the browser tab nameAlways
meta name="description"Often used as the search snippet; not a ranking factorAlways
link rel="canonical"Tells Google which URL to index when several show the same contentRecommended on every indexable page
meta name="robots"noindex, nofollow, nosnippet, max-image-preview and other directivesOnly when you need a non-default
og:title, og:description, og:image, og:urlThe link card on LinkedIn, Facebook, Slack, iMessage and XYes, for any page that gets shared
twitter:cardPicks the small or large X cardYes, if you want the large image card
meta name="theme-color"Tints the browser UI on supporting mobile browsersOptional

How to use the meta tag generator

  1. 1.Write the title keyword-first, with your brand at the end, and keep the meter under the desktop limit.
  2. 2.Write a description of about 120–160 characters that says what the reader gets from the page.
  3. 3.Paste the canonical URL exactly as you want it indexed: https, your preferred host, no UTM parameters.
  4. 4.Leave robots on index, follow unless the page should stay out of search. Set Image preview to large if you want Google to show large image previews, for example in Discover.
  5. 5.Add an absolute og:image URL (PNG or JPEG, ideally 1200×630) and alt text. The OG title and description fall back to the search ones, so only fill them in if you want different wording for social.
  6. 6.Switch between HTML and Next.js output, copy it, and fix anything listed under Checks.

Example: the same tags in HTML and Next.js

<title>Cookie-Free Web Analytics | Example</title>
<meta name="description" content="See which channels bring paying customers, not just visitors." />
<link rel="canonical" href="https://example.com/analytics" />
<meta name="theme-color" content="#0E0E0D" />

<!-- Open Graph -->
<meta property="og:type" content="website" />
<meta property="og:title" content="Cookie-Free Web Analytics | Example" />
<meta property="og:url" content="https://example.com/analytics" />
<meta property="og:image" content="https://example.com/og.png" />

<!-- X / Twitter -->
<meta name="twitter:card" content="summary_large_image" />
Plain HTML: paste inside <head>. Works with any framework or static site.
import type { Metadata, Viewport } from "next";

export const metadata: Metadata = {
  title: "Cookie-Free Web Analytics | Example",
  description: "See which channels bring paying customers, not just visitors.",
  alternates: { canonical: "https://example.com/analytics" },
  openGraph: {
    type: "website",
    url: "https://example.com/analytics",
    images: ["https://example.com/og.png"],
  },
  twitter: { card: "summary_large_image" },
};

export const viewport: Viewport = { themeColor: "#0E0E0D" };
Next.js App Router: export from page.tsx or layout.tsx. Next.js renders the tags for you.

The full list of fields is in the Next.js generateMetadata reference. If you use relative URLs in Next.js, set metadataBase in your root layout so they resolve to absolute ones.

Common meta tag mistakes

  • noindex plus a robots.txt block. Google has to crawl a page to see its noindex, so blocking it in robots.txt can leave the URL indexed anyway. Use one or the other. Test the rule with the robots.txt tester.
  • Every page canonicalized to the homepage. A canonical says "this page is a copy of that one", so pointing all pages at / asks Google to drop them.
  • Canonicals with tracking parameters or http://. They split signals across URL variants instead of consolidating them.
  • A relative og:image path. Most crawlers that build link cards ignore relative image URLs; use the full https:// address.
  • SVG share images. Facebook, LinkedIn and X don't render SVG as og:image. Export a PNG or JPEG.
  • The same title and description on every page of a template. Google is more likely to rewrite them, and results become indistinguishable.
  • Keeping the keywords meta tag. Google doesn't use it, and it tells competitors what you're targeting.

What happens after the click

Good meta tags win the click; they don't tell you whether it was worth anything. VisitTrack connects to Google Search Console so you see the queries that bring people in next to your traffic, then shows what those visitors did: goals, signups and revenue by channel. It's one cookie-free script tag, and it can also track AI crawlers like GPTBot and ClaudeBot that read your pages without running JavaScript.

Frequently asked questions

What meta tags are important for SEO?

The title tag and meta description, which shape your search result; the canonical link, which tells Google which URL to index; and the robots meta tag when a page shouldn't be indexed. Open Graph tags don't affect rankings but control how the page looks when shared.

How long should a title tag and meta description be?

About 50–60 characters for the title and 120–160 for the description. Google truncates by pixel width (around 600px for desktop titles and 920px for descriptions), so wide letters and capitals can push shorter text over the limit.

Do I need a robots meta tag on every page?

No. Without one, search engines treat the page as index, follow. Add it only when you want different behavior, for example noindex on thank-you pages, internal search results or staging copies.

Should the canonical URL point to the page itself?

Yes, for normal pages. A self-referencing canonical helps consolidate variants of the same URL, such as UTM-tagged links, trailing slashes or http and https. Point it elsewhere only when the page is a duplicate of another URL.

Do I need both Open Graph and Twitter tags?

You need Open Graph tags plus twitter:card. X reads og:title, og:description and og:image when the matching twitter: tags are missing, but twitter:card is what selects the large image card. This generator outputs both so every platform gets explicit values.

Where does themeColor go in Next.js?

In the viewport export, not in metadata. Next.js moved themeColor, colorScheme and viewport settings to a separate viewport export (or generateViewport) in version 14. The Next.js output here already splits them.

Does the keywords meta tag help SEO?

No. Google has said it doesn't use the keywords meta tag for ranking. You can leave it out.

Related tools and guides

See which channels actually bring paying customers

VisitTrack is cookie-free analytics with revenue attribution built in. One script tag, no consent banner, live in two minutes. 14 days free, no card required.

14-day free trial · No card required · Cookie-free · Cancel anytime

Or explore the live demo first →