Meta Tag Generator

Generate the head tags a page needs: title, description, canonical, robots directives, viewport and language, with the lengths search engines actually use.

Live output

Enable JavaScript to customise; default output below.

Google truncates around 580 pixels, which is roughly 55 to 60 characters.

Not a ranking factor, but it is the sentence people read before deciding to click. 120 to 160 characters.

The address this page should be indexed under. Always absolute.

Live preview meta-tags.html
<!-- Put these inside <head>. The html element needs the lang attribute too. -->
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Free WordPress Developer Tools</title>
	<meta name="description" content="Generators and converters for WordPress developers. Everything runs in your browser.">
	<link rel="canonical" href="https://bucketwp.com/">
	<meta name="robots" content="index, follow">
	<link rel="icon" href="/favicon.ico">
</head>

Output is valid and updates as you type.

Fill in the page details and copy the head tags out: title, description, canonical, robots directives and the two lines every page needs before any of the rest matters.

How to use

  1. Write the title for the result page, not for the file. Around 55 to 60 characters survives; anything past that is cut with an ellipsis.
  2. Treat the description as ad copy. It is not a ranking factor, but it decides whether the result gets clicked. 120 to 160 characters.
  3. Set the canonical to the absolute URL this page should be indexed under, including the protocol and the host.
  4. Leave charset and viewport on. The first has to appear within the first 1024 bytes, the second is what makes the page usable on a phone.
  5. Copy the tags into <head>, and put the lang attribute on the html element rather than in a meta tag.

Example

A page that should be indexed with a large image preview:

<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Free WordPress Developer Tools</title>
	<meta name="description" content="Generators and converters for WordPress developers.">
	<link rel="canonical" href="https://bucketwp.com/">
	<meta name="robots" content="index, follow, max-image-preview:large">
</head>

max-image-preview:large is what allows a full width thumbnail beside the result. Without it Google may show a small one or none.

Pitfalls

  • A page blocked in robots.txt cannot be read, so a noindex tag on it is never seen. Use one or the other, not both.
  • A relative canonical resolves against the current URL, so it usually points at itself and does nothing. Use the absolute URL.
  • Two canonical tags on one page make both untrustworthy, and search engines then pick for you. Check your theme and your SEO plugin are not both adding one.
  • The keywords meta tag has been ignored by Google since 2009. Nothing here emits it on purpose.
  • A charset declared after the first 1024 bytes can be missed, which is how a page ends up rendering mojibake.
  • Missing viewport is why a site looks zoomed out on a phone regardless of the CSS.
  • nosnippet removes the description from results entirely. That is usually worse than a description you are unhappy with.
  • Setting noindex on a page that other pages link to wastes those links. Consider whether the page should exist at all.

Compatibility

These tags are plain HTML5 and are read by every search engine and social network. theme-color is honoured by Chrome on Android and by Safari 15 and later on macOS; other browsers ignore it. max-snippet, max-image-preview and max-video-preview need a crawler that supports the 2019 robots directives, which Google and Bing both do. The tool runs entirely in your browser.

Frequently asked questions

How long should the title be?
Aim for 55 to 60 characters. Google measures pixels, not characters, so a title full of capitals is cut sooner.
Does the description affect rankings?
No. It affects whether people click the result, which is worth more than most of what does affect rankings.
Do I need a canonical on every page?
A self referencing canonical on every page is the safe default. It settles parameter and trailing slash variants without any extra work.
noindex or robots.txt?
noindex to keep a page out of results; robots.txt to stop it being crawled at all. Combining them stops the crawler ever seeing the noindex.
Where does the lang attribute go?
On the html element. There is no meta tag equivalent that browsers or screen readers use.
Weekly drops

New tools, when there are new tools

One email when something worth using ships. No schedule to fill, so no filler.

Your address goes nowhere else, and one click unsubscribes.