Meta tag generator
Fill in the fields and watch the Google result and the shared-link card update as you type. Copy the whole block when it looks right.
What each tag is actually for
Meta tags do three separate jobs, and they are worth keeping straight because only one of them touches ranking at all.
Telling search engines what the page is. The title tag is a genuine ranking factor and the most important line in your head. The description is not a ranking factor — it has not been one since 2009 — but it is what people read before deciding whether to click, so it decides your click-through rate.
Telling them what to do with the page. The robots meta tag controls indexing. The canonical link tells Google which URL is the real one when several show the same content.
Controlling how the link looks when shared. Open Graph and Twitter card tags decide the title, description and image that appear when someone pastes your URL into Slack, WhatsApp, LinkedIn or anywhere else. Without them the platform guesses, and it usually guesses badly.
Writing a title that works
Roughly 60 characters, though Google measures pixels rather than characters — a title of capital letters gets cut sooner than one of lowercase. The counter above turns red at 60, which is the practical limit.
- Put the important words first. Truncation happens at the end.
- One page, one title. Duplicate titles across a site are one of the most common technical SEO faults, and they make Google pick which page to show rather than you.
- The brand name goes at the end, separated by a dash or a pipe, and only if there is room.
- Describe the page, not the site. "Linen shirts" beats "Acme — quality clothing since 1998".
The share image
1200 × 630 pixels is the size that works on every platform. Below 600 × 315, Facebook falls back to a small square thumbnail and the link becomes much less prominent in a feed.
- Use an absolute URL. A relative path silently fails everywhere.
- Serve it over HTTPS. Several platforms will not fetch an insecure image.
- Keep it under 5 MB, and preferably well under — the crawler gives up on slow images.
- Put any text in the middle. Different platforms crop different amounts off the edges.
- Add
og:image:alt. It is read out by screen readers on the platforms that support it.
When you change an image, the old one stays cached. Facebook's Sharing Debugger and LinkedIn's Post Inspector both have a re-scrape button; use it rather than waiting.
Canonical tags, and how to get them wrong
A canonical link says "of all the URLs showing this content, this one is the original". It consolidates ranking signals instead of splitting them across duplicates.
Four mistakes worth knowing about:
- Every page pointing at the homepage. This tells Google the rest of your site does not exist. It happens when a canonical tag is added to a shared template without a variable in it.
- A relative URL. Always use the absolute form, including the protocol.
- Not matching your actual URL. If your site serves trailing slashes, the canonical must have one. A mismatch is a contradiction and Google will resolve it however it likes.
- Canonical plus noindex on the same page. Contradictory instructions. Pick one.
The generated block, explained
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Linen shirts, made in small runs — Acme</title>
<meta name="description" content="Hand-finished linen shirts cut in Leeds.">
<link rel="canonical" href="https://acme.test/shirts/linen/">
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
<meta property="og:type" content="website">
<meta property="og:title" content="Linen shirts, made in small runs — Acme">
<meta property="og:image" content="https://acme.test/og/linen.png">
<meta name="twitter:card" content="summary_large_image">
charset comes first because it must appear within the first 1024 bytes of the document.
max-image-preview:large permits the large thumbnail in Google Discover, which is worth having
and is off by default in some regions. max-snippet:-1 removes the cap on snippet length.
Once you have pasted this in, run the page through the HTML validator to check nothing was left unclosed, and use the schema generator to add structured data on top.
Questions about this generator
Do meta keywords still do anything?
No. Google stopped using them in 2009 and said so publicly. Bing treats their presence as a mild spam signal. This generator does not produce them, deliberately.
Does the meta description affect rankings?
Not directly, and it has not for a long time. It affects the click-through rate of your result, which is worth optimising for on its own terms. Google also rewrites descriptions frequently, pulling a passage from the page when it matches the query better than yours does.
Why does my share preview show the wrong image?
Almost always caching. Platforms fetch your Open Graph tags once and keep them for days. Use Facebook's Sharing Debugger or LinkedIn's Post Inspector and press the re-scrape button. If the image is right there but wrong in the wild, wait — the cache will expire.
Do I need Twitter tags if I have Open Graph?
Not strictly. Twitter falls back to Open Graph when its own tags are absent. Adding twitter:card is still worth it because it is what selects the large-image layout rather than the small one.
What is the difference between noindex and robots.txt?
A noindex meta tag lets the crawler in and asks it not to list the page. A Disallow in robots.txt keeps the crawler out entirely — which means it never sees the noindex tag. If you want a page out of the index, use noindex and let it be crawled. Blocking it in robots.txt can leave a URL-only result in place indefinitely. The robots.txt generator goes into this further.
Related tools
HTML Formatter
Indent and structure any HTML file.
OpenHTML Beautifier
Turn minified HTML back into readable code.
OpenHTML Pretty Printer
Pretty-print HTML with the indent you want.
OpenHTML Minifier
Strip whitespace and comments from HTML.
OpenHTML Validator
Find unclosed tags and broken nesting.
OpenHTML Code Cleaner
Tidy exports from CMS and email builders.
OpenLearn the why, not just the how
Longer reading on formatting, indentation and minification.