HTML SEO meta tags: every tag that matters, what it does, and the ones to stop using

A copy and paste reference for the head of an HTML page, with the tags search engines read, the social tags, and the legacy tags that do nothing.

Published by AI Knows Us · Updated 13 October 2026

Six tags in the head of an HTML page do real SEO work: the title element, the meta description, the meta viewport, the canonical link, the robots meta tag and the hreflang links. Open Graph and Twitter card tags control how a link looks when it is shared. Everything else you will find in old templates, meta keywords, meta revisit after, meta author for ranking, meta language, does nothing for search engines today and can be removed safely. Here is the full reference, with a head block you can copy.

The head block that covers it

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>HTML meta tags for SEO: the full reference</title>
  <meta name="description" content="Every head tag search engines read, what each one does, and the legacy tags you can delete.">

  <link rel="canonical" href="https://example.com/html-meta-tags-for-seo">
  <meta name="robots" content="index, follow, max-image-preview:large">

  <link rel="alternate" hreflang="en-gb" href="https://example.com/uk/html-meta-tags-for-seo">
  <link rel="alternate" hreflang="x-default" href="https://example.com/html-meta-tags-for-seo">

  <meta property="og:type" content="article">
  <meta property="og:title" content="HTML meta tags for SEO: the full reference">
  <meta property="og:description" content="Every head tag search engines read, and the legacy tags you can delete.">
  <meta property="og:url" content="https://example.com/html-meta-tags-for-seo">
  <meta property="og:image" content="https://example.com/img/meta-tags-1200x630.png">
  <meta name="twitter:card" content="summary_large_image">
</head>

The tags that do real work

title

Not technically a meta tag, and the most important element in the head. It is the clickable line in search results and a strong relevance signal. Keep the useful part under roughly sixty characters, put the primary phrase near the front, and make it specific to this one page. Every page needs its own title; duplicate titles across a site are one of the most common findings in any audit.

meta description

Not a ranking factor. It is the sales line under the title, and it decides a meaningful share of your clicks. Around 150 characters, active voice, one concrete benefit, and include the query phrase so it appears in bold. Write a unique one per page. Where a page has no description, search engines generate one from the body copy, which is fine for long tail pages and wasteful on your commercial pages.

meta viewport

Required for mobile rendering. Without it a page renders at desktop width on a phone and fails mobile usability. Use the standard value and do not disable zooming.

link rel canonical

Tells search engines which URL is the one you want indexed when several URLs show the same content. Use the absolute URL, make it self referencing on every page, and keep it consistent with your internal links, your sitemap and your redirects. Conflicting signals are why a canonical gets ignored.

meta robots

Controls indexing and snippet behaviour for this page. The values you use most are index, noindex, follow, nofollow, noarchive, nosnippet, max-snippet, max-image-preview and noimageindex. A noindex page must stay crawlable for the directive to be seen, so never block it in robots.txt at the same time.

link rel alternate hreflang

For sites with the same content in more than one language or regional variant. Every version must list every version, including itself, and one should carry x-default. Hreflang is the tag that most often ships broken, so validate it after any URL change.

The social tags

Open Graph and Twitter card tags do not affect ranking. They control the title, description and image shown when your link is pasted into a message, a social post or a chat app, which affects whether anyone clicks it. The minimum useful set is og:title, og:description, og:url, og:image and og:type, plus twitter:card. Use a 1200 by 630 pixel image and absolute URLs. If you omit the Twitter tags, most platforms fall back to the Open Graph values.

Tags you can delete today

TagStatusWhat to do
meta keywordsIgnored by major search engines for many yearsDelete. Writing competitor names into it only helps competitors reading your source
meta revisit-afterNever supported by major search enginesDelete. Crawl rate is set by them, assisted by your sitemap
meta language or content-languageNot used for rankingDelete. Use the lang attribute on the html element and hreflang
meta authorNot a ranking signalHarmless to keep. Express real authorship in structured data and a visible byline
meta rating, meta distribution, meta copyrightTemplate leftoversDelete
meta refreshPoor for users and for crawlingReplace with a server side 301 redirect
Verification meta tagsNeeded once, then only by the toolKeep the ones in active use, remove verifications for tools you no longer own

The mistakes that cost the most

  • A site wide noindex left on after a staging launch. Check the live robots meta on your homepage after every deployment. This one mistake removes a whole site from search.
  • Canonicals pointing at the homepage from every page. A common CMS misconfiguration that collapses your whole site into one indexed URL.
  • Duplicate titles and descriptions across templated pages. Build the template so each page composes its own from real fields.
  • Tags injected only by JavaScript. Put the title, description, canonical and robots tags in the server rendered HTML. Rendering usually resolves them, and server rendered is one less thing that can go wrong.
  • Two copies of the same tag. A theme and a plugin both writing a canonical or a robots tag produces conflicting instructions. Audit the rendered source, not the settings screen.
  • Relative URLs in canonical and og:url. Use absolute URLs with the protocol.

A ten minute check on any page

  • View the rendered source and confirm there is exactly one title, one description, one canonical and one robots tag.
  • Confirm the canonical matches the URL you want indexed, character for character.
  • Confirm the robots tag says what you intend, and that the page is not also blocked in robots.txt.
  • Paste the URL into a messaging app and look at the preview card.
  • Run the URL through a rich results validator to check your structured data separately from the meta tags.

This page is the reference for the head of an HTML page. For the full detail on writing descriptions and stopping Google rewriting them, see meta descriptions. For every robots value and when to use the HTTP header instead, see the robots meta tag. For the site wide checks around them, see the technical SEO checklist.

Asked and answered: HTML SEO meta tags

Does the meta keywords tag still work?

No. The major search engines stopped using it long ago. Remove it and put the effort into the title, the description and the body copy.

How long should a title tag and meta description be?

Aim for under sixty characters of essential content in the title and around 150 characters in the description. Both are measured in pixel width rather than characters, so front load the important words and the truncation point stops mattering.

Do I need Open Graph tags for SEO?

They do not affect ranking and they do affect how many people click a shared link. Add the five core tags once in your template and they work across every page.

What is the difference between the robots meta tag and robots.txt?

The robots meta tag tells a crawler what to do with a page it has fetched. Robots.txt tells it which URLs to fetch at all. To keep a page out of the index, allow the crawl and use noindex.

Should meta tags be rendered by JavaScript?

Put them in the server rendered HTML. It is simpler to debug, faster to read and consistent for every crawler and preview service that fetches the page.

What an assistant reads from your head tags

The title and description you write in the head still do their job in the results page. The assistants make their own use of the same page: they read it, compress it, and decide whether it supports an answer.

That makes the tags in this reference a small test of clarity. If someone read only your title, canonical and description, would they know what the page claims? Check by asking an assistant a question your page answers, then see whether the page is cited and how it is paraphrased. AI Knows Us lists the pages each answer cites, so you can match the paraphrase to your own markup.

Read next

Or browse the whole archive.

See what AI says about you.

The first scan is free, it needs no account, and it asks the questions your buyers ask.

Free. No card. We ask 5 real buyer questions on 2 AI apps.

Already sure you want this? Join the waitlist. We open on 31 October 2026. It costs an email address. No card, and nothing is charged. Or talk to a person if you have a question first. Or read how we fix what it finds.