Home › Guides › Developer › HTML meta tags that matter

The HTML meta tags that matter

Which head tags search engines and social sites really use, which Google ignores, and how to write each one correctly.

By the tools4free.dev team · Last reviewed 4 December 2026

Only a few HTML tags in the <head> change how search engines and social sites treat a page. The ones that matter are the <title> element, the description and robots meta tags, viewport, the canonical link and Open Graph tags for sharing. Google does not use the keywords meta tag at all, and it ignores any meta tag it does not support.

What Google reads and what it ignores

Google Search Central lists the tags it supports. Everything else is ignored, which is harmless but pointless.

TagGoogle SearchPurpose
<title> elementUsedMain source for the title link in results.
descriptionUsed, for snippetsMay be shown under the title. Google can write its own instead.
robots / googlebotUsedControls indexing and snippets.
viewportUsedMobile rendering.
charsetUsedPage encoding. UTF-8 recommended.
google-site-verificationUsedProves ownership in Search Console.
notranslate, nopagereadaloudUsedOpt out of translation or text-to-speech.
keywordsIgnoredNo effect on indexing or ranking at all.
Open Graph, Twitter cardsNot for rankingUsed by social and chat sites for previews.

Title

The title is not a meta tag, but it is the most important line in the head. Write one unique title per page that names the topic first and the site last. Google publishes no character limit for titles. Results are cut by pixel width, and a common rule of thumb is to stay near 60 characters so nothing is clipped. Google may also rewrite a title that is empty, stuffed with keywords or does not match the page, so an honest, specific title survives better than a clever one.

Description

The description is a candidate for the snippet under your title link. Google may use it when it describes the page better than text taken from the page itself. It does not affect ranking. Write one or two plain sentences that say what the visitor will find, and make each page's description different. A length of 50 to 160 characters is a sensible target, but again that is a display guideline and not a rule. Quotes need escaping inside the attribute, which is why generated tags show &quot;.

Robots

<meta name="robots" content="noindex, nofollow">
<meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large">

Common values are noindex (keep the page out of results), nofollow (do not follow its links), nosnippet, noarchive, max-snippet and max-image-preview. The values index and follow are the defaults, so writing them changes nothing. If two robots tags conflict, Google applies the more restrictive one.

The important trap is the interaction with robots.txt. A crawler can only see a noindex tag on a page it is allowed to fetch. If robots.txt blocks the page, the tag is never read, and the URL can still appear in results, without a snippet, if other sites link to it. To remove a page, allow crawling and use noindex.

Viewport

<meta name="viewport" content="width=device-width, initial-scale=1">

Without it, mobile browsers lay the page out at a desktop width and shrink it. With it, the layout matches the screen. Do not add user-scalable=no or a low maximum-scale: they block pinch zoom, which harms people with low vision and conflicts with the WCAG success criterion on resizing text.

Canonical

<link rel="canonical" href="https://example.com/pets/">

This is a link element rather than a meta tag. It names the preferred address when the same content is reachable at several, for instance with tracking parameters or with and without a trailing slash. Google treats it as a strong hint, not a command. Use an absolute URL, put one canonical in the head, and point it at a page that returns 200 and is not itself redirected. A page may reference itself.

Open Graph and Twitter cards

The Open Graph protocol, created by Facebook and documented at ogp.me, controls how a link looks when pasted into social networks and chat apps. Four properties are required: og:title, og:type, og:image and og:url. A description is optional but expected. Platforms that read X (Twitter) cards use twitter:card and fall back to Open Graph for the rest. An image of 1200 by 630 pixels is the common recommendation for large previews. That size is a convention of the platforms rather than part of the protocol. Open Graph does not influence Google rankings.

Worked example 1: a generated set of tags

We ran the title Dog & Cat Guide, a description containing quotation marks and the address https://example.com/pets/ through our generator's code in Node. Part of the output:

<meta name="description" content="A short &quot;plain&quot; guide to caring for a dog and a cat in a small flat, with costs and routines.">
<link rel="canonical" href="https://example.com/pets/">
<meta property="og:title" content="Dog &amp; Cat Guide">
<meta name="twitter:card" content="summary_large_image">

The ampersand in the title became &amp; and the quotes became &quot;. If you paste raw quotes into an attribute value you end the attribute early and corrupt the tag, so escaping is not optional.

Worked example 2: the minimal head

A complete head for a normal article needs very little:

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dog and cat care | Example</title>
<meta name="description" content="What a dog and a cat each cost per month, and how to plan routines.">
<link rel="canonical" href="https://example.com/pets/">

That is five lines. The title uses 26 characters and the description 67, both comfortably inside the display guidelines. Add robots only when you want to restrict something, and add Open Graph if the page will be shared. The character declaration should appear early: the HTML standard requires it within the first 1,024 bytes of the document.

Checking your work

View the page source rather than the inspector, because the inspector shows the DOM after scripts have run. A tag injected by JavaScript may not be there when a crawler or a link preview bot reads the raw HTML, and social platforms in particular often do not run scripts. Search Console's URL Inspection shows what Google saw, and a sharing debugger from the platform shows the preview it will build.

Common mistakes

Frequently asked questions

Does the meta description improve rankings?

No. It can improve the snippet, and a clearer snippet can win more clicks, but it is not a ranking signal.

Will Google always show my description?

No. It chooses a snippet from the page or the tag, depending on the search.

Do I need Open Graph tags on every page?

Only on pages people are likely to share. Without them, platforms guess from the page content and the preview is often poor.

Should I set the language with a meta tag?

Google works out the language from the visible text, not from a code annotation. Still set lang on the html element, because screen readers and browsers use it.

Try it: fill in a title, description and address in the meta tag generator to get escaped description, canonical, Open Graph and card tags ready to paste. It runs in your browser.

Sources