By Tim King · Updated
Meta Tag Generator
Head Meta Tags With Robots and Canonical Set Correctly, Plus Charset and Viewport
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Meta Tag Generator works
This meta tag generator writes the head tags every page needs. Every page needs the same dozen lines at the top of <head>, and the details are easy to get
wrong: the charset must come first, the robots tag has a grammar of its own, and the canonical
link needs an absolute URL. Fill in the fields, pick the robots directives from dropdowns, and
copy a block that is correct and in the right order. Title and description lengths are checked
against what search results actually display.
Meta tag generator: the essential tags
Meta tags are the page's conversation with browsers and crawlers before any content is read. Some affect rendering, some affect indexing, and several are ignored entirely by modern search engines despite appearing in every tutorial. This tool writes the ones that matter, in the order that matters, and leaves out the ones that do not.
Charset and viewport. <meta charset> should be the first thing in <head> and within the
first 1024 bytes of the document, because the browser needs the encoding before it can read
anything else. UTF-8 is the only sensible choice for a new page. The viewport tag makes the page
render at device width on phones; without it mobile browsers assume a desktop layout and shrink
it. The viewport-fit=cover variant lets the page extend behind notches and rounded corners on
phones when your CSS handles the safe-area insets.
Title and description. The title is the most important on-page ranking factor and the headline of the search result. Around 60 characters is safe before truncation; the tool warns above that. The description does not affect ranking but is the snippet under the headline when Google decides it fits the query, so write it as a sentence that earns the click. Keep it under 160 characters; under 70 wastes space. If you need help drafting one from page text, the Meta Description Generator on this site does that.
Keywords and author. The keywords tag has not been used for ranking by Google since 2009 or
by Bing since 2014, and it can hand competitors a list of your targets. It is here because some
internal search systems and CMS templates still read it; leave it blank unless you know something
does. author is harmless and used by a few reader tools.
Robots. The robots tag is a comma-separated list of directives, and the defaults —
index, follow — do not need writing unless a tool or checklist insists, which the explicit
option covers. noindex keeps the page out of results while still passing link equity;
nofollow stops crawlers following links on the page. max-snippet limits the text preview,
max-image-preview controls how large an image thumbnail can appear, noarchive suppresses the
cached copy and notranslate hides the translate offer. Robots tags apply per page; for
site-wide rules use robots.txt, but remember that robots.txt blocks crawling and cannot
remove an already-indexed URL, whereas noindex can.
Canonical. <link rel="canonical"> tells search engines which URL is the definitive one
when the same content is reachable at several addresses — with and without trailing slash,
with tracking parameters, over HTTP and HTTPS. It must be absolute and should be self-referencing
on the canonical page itself. The Canonical URL Generator on this site helps when the rules are
more involved.
The rest. theme-color tints the browser chrome on Android and in some desktop browsers.
referrer sets the default referrer policy for outgoing requests; strict-origin-when-cross-origin
is the modern browser default and a sensible explicit choice. format-detection stops iOS Safari
turning anything that looks like a phone number into a link, which matters on pages with prices
or IDs. Verification tags are how Google Search Console, Bing Webmaster Tools and others confirm
you own the site when you cannot use DNS; type them as google-site-verification = token, one
per line.
What is left out. Open Graph and Twitter card tags have their own generator on this site.
http-equiv refresh, revisit-after, rating, distribution and expires are ignored by
every major engine and omitted here.
FAQ
Do meta keywords help SEO?
No. Google confirmed in 2009 that it ignores the keywords tag for ranking and Bing dropped it soon after. Filling it in can only tell competitors which terms you target. The field is provided for the rare internal search system that still reads it; leave it empty otherwise.
Should I write index, follow explicitly?
It is not necessary — both are the defaults when no robots tag is present. Some audit tools flag the missing tag as a warning, so the option exists to silence them. It does no harm either way; it simply adds a line.
How long should the title and description be?
Titles display fully up to roughly 60 characters or 600 pixels; longer ones are cut with an ellipsis. Descriptions show around 155 to 160 characters on desktop and fewer on mobile. Google rewrites descriptions it thinks do not match the query, so a good one is relevant, specific and under the limit.
What is the difference between noindex and robots.txt?
robots.txt stops crawlers fetching a URL; noindex lets them fetch it but asks them not to
list it. A URL blocked in robots.txt can still appear in results from links alone, and the
crawler never sees a noindex on a page it cannot fetch. To remove a page from search, allow
crawling and use noindex.
Where do Open Graph tags go?
Directly after these, still inside <head>. They use property rather than name and drive
link previews on social platforms rather than search results. Generate them with the Open Graph
Tags Generator and paste both blocks together.
See also: all SEO tools, Dev Utilities, Formatters & Validators, Data & Encoding, Security & Identifiers, Accessibility, AI.
Related tools
Meta Description Generator
Draft meta descriptions from your own page text, trimmed to length.
Meta Tag & Open Graph Checker
Check title, description, canonical, Open Graph and Twitter card tags in pasted HTML.
Open Graph Tags Generator
Generate Open Graph and Twitter card meta tags for rich link previews.
Canonical URL Generator
Normalise URLs to their canonical form and generate rel=canonical tags.
Title Length Checker
Check page titles and meta descriptions by pixel width, not just characters.