How to generate meta tags
- Write the page title and description. The counts under each box compare them with common guidance.
- Add the page's canonical URL, the full address you want search engines to treat as the original.
- Choose whether search engines may index the page and follow its links.
- Add a share image URL and alt text for link previews, and pick the X card type.
- Fix anything marked under Checks, then copy the HTML and paste it inside the page's
<head>.
What each tag does
| Tag | What it's for | Common guidance |
|---|---|---|
<title> | The browser tab, and usually the title of the search result | About 50–60 characters; Google cuts by width, around 600 pixels |
meta description | Often used as the snippet under the result | About 120–160 characters; no limit is set |
meta robots | Asks search engines not to index the page or follow its links | Leave it out for index, follow |
link rel="canonical" | Names the preferred URL when the same content has several | A full, absolute URL |
og:title, og:description, og:image, og:url | The card shown when the link is shared on Facebook, LinkedIn, WhatsApp, Slack and others | Image 1200 × 630 pixels |
twitter:card | Chooses a small or large image card on X; other X tags fall back to Open Graph | summary_large_image for a wide image |
meta viewport | Makes the page fit phone screens | width=device-width, initial-scale=1 |
meta theme-color | Tints the browser's toolbar on some phones | Your brand colour |
The length figures are common guidance, not rules. Google sets no limit on titles or descriptions; it truncates them to fit the screen, and may show a different title or snippet if it judges another one describes the page better for a search.
Tags you can skip
- Meta keywords. Google says it doesn't use the keywords tag for indexing or ranking.
- Robots index, follow. It's the default when there's no robots tag, so it adds nothing.
- Separate twitter:title and twitter:description. X falls back to the Open Graph title and description; set them only to say something different on X.
Good titles and descriptions
- Make each page's title unique and specific: what the page is, then the brand.
- Put the words people search for near the start, once, written naturally.
- Describe what someone gets from the page in the description, like a short advert for it.
- A noindex tag only works if crawlers can fetch the page, so don't also block it in robots.txt.
Sources
Each link was last checked on .
- Influencing your title links in search results, Google Search Central: titles are truncated to fit the device width, and Google may build title links from other text on the page.
- Control your snippets in search results, Google Search Central: there's no length limit on meta descriptions, snippets are truncated to fit, and they're usually generated from the page.
- Meta tags and attributes that Google supports, Google Search Central: the meta tags Google reads, and that it ignores the keywords meta tag.
- Robots meta tag, data-nosnippet, and X-Robots-Tag specifications, Google Search Central: the index, noindex, follow and nofollow values, and that a page blocked by robots.txt can't show its noindex.
- How to specify a canonical URL with rel="canonical" and other methods, Google Search Central: canonical links belong in the head and should use absolute URLs.
- The Open Graph protocol, The Open Graph protocol: the og:title, og:type, og:image and og:url properties, image structured properties, and that the first of repeated tags wins.
- Cards markup tag reference, X Developer Platform (archived copy of 1 February 2026; the live page now redirects): twitter:card types, title up to 70 and description up to 200 characters, images under 5 MB, and Open Graph fallbacks.
- Images in link shares, Meta for Developers: images of at least 1200 × 630 pixels, close to 1.91:1, and no larger than 8 MB.
Common uses
- Launching a new page. Fill in the title, description, canonical URL and share image once, copy the code into the page's head, and the page is ready for search results and shared links.
- Fixing a bare link preview. If a shared link shows no image or the wrong title, generate the Open Graph and X card tags it's missing and add them to the page.
- Keeping a draft page out of Google. Set robots to noindex for a thank-you page, a staging copy or a private landing page, and paste the generated robots tag into its head.