SEO Basics

Metatags: The Complete Guide

What the charset, viewport, description and robots tags do, and how to write them so they actually help your search visibility.

404Pulse Editors Jul 16, 2026 9 min read
Metatags: The Complete Guide

Meta tags are small snippets of HTML that describe your page to browsers and search engines. They do not appear in the body of your content, but they quietly shape how your page is crawled, indexed, and displayed in search results. This guide explains every meta tag that still matters in 2026, which ones are safe to ignore, and how to write them so they actually help.

The short version

  • Meta tags live in the <head> of your HTML and give machines context about the page.
  • The four that earn their keep today are the charset declaration, the viewport tag, the meta description, and the robots meta tag.
  • Google openly ignores the old "meta keywords" tag, so stuffing it wastes effort.
  • Good meta tags do not raise rankings by themselves; they improve click-through, indexing control, and mobile rendering.

What is a meta tag?

A meta tag is an HTML <meta> element placed inside the document head. According to MDN's reference on the meta element, it represents metadata that cannot be expressed by other head elements like <title> or <link>. Metadata is simply data about data: information that describes the page rather than being shown on it.

The element carries its meaning through attributes. The most common pattern pairs a name attribute with a content attribute, for example <meta name="description" content="...">. Other forms use charset to declare encoding, or http-equiv to simulate an HTTP response header. Because a meta tag is a void element, it never needs a closing tag.

People search for both "metatags" and "metatag" as one word, but in the HTML spec the term is two words: meta tags, or more precisely the meta element. However you spell it, the underlying HTML is identical.

Why meta tags matter for SEO

Metatags: The Complete Guide

Meta tags do not give you a direct ranking boost the way strong content and quality links do. Their value is indirect but real. A clear meta description can lift your click-through rate from the search results page. A correct viewport tag signals a mobile-friendly layout. A robots meta tag keeps thin or duplicate pages out of the index. Get these wrong and you can accidentally hide your best pages or serve a broken preview to searchers.

Think of meta tags as the control panel between your page and the machines that read it. They will not fix weak content, but they let a strong page communicate accurately. If you are still building your foundations, start with our complete guide to SEO and treat meta tags as one layer within that larger picture.

The essential meta tags in 2026

Google publishes a list of the meta tags it actually understands. Based on Google Search Central's documentation on meta tags Google supports, these are the ones worth your attention.

  • Charset: <meta charset="utf-8"> declares the character encoding. UTF-8 is the modern default and prevents garbled characters. It must appear within the first 1024 bytes of the document.
  • Viewport: <meta name="viewport" content="width=device-width, initial-scale=1"> tells mobile browsers to render at the device width. This is central to a mobile-friendly experience.
  • Description: <meta name="description" content="..."> offers a short page summary that search engines may use as the snippet beneath your title.
  • Robots: <meta name="robots" content="..."> controls indexing and crawling behavior with values like noindex, nofollow, and max-snippet. You can target Google specifically with name="googlebot".

Verification tags such as google-site-verification also live here; they prove ownership of a property in Search Console but do nothing for ranking.

Writing a meta description that earns clicks

Metatags: The Complete Guide

The meta description is the snippet you have the most control over. Google's own advice is that a good description is short, unique to one page, and highlights the most relevant points a searcher cares about. Aim for roughly 120 to 160 characters so the text is not truncated on most devices.

A few practical rules keep descriptions effective:

  1. Write for the searcher, not the algorithm. Describe what the page delivers and why it is worth a click.
  2. Include the primary keyword naturally, since Google often bolds matching query terms in the snippet.
  3. Make every page unique. Duplicate descriptions across a site dilute their usefulness.
  4. Avoid deception. If the snippet oversells, bounce rates climb and trust falls.

Tip: Google does not always use your meta description. It frequently rewrites the snippet using text from the page that better matches the specific query. Write a strong description anyway; it is your best offer, and it wins often enough to matter.

The robots meta tag: your indexing switch

The robots meta tag is the most powerful item in this list because it decides whether a page appears in search at all. Common directives include:

  • noindex: keep this page out of the search index.
  • nofollow: do not pass ranking signals through links on this page.
  • noindex, follow: hide the page but still crawl its links.
  • max-snippet, max-image-preview, and max-video-preview: limit how much preview content Google shows.

Use noindex deliberately on thin pages like internal search results, thank-you pages, and duplicate archives. One caution: if you want a page removed from the index, do not block it in robots.txt, because a blocked page can never be crawled to see the noindex directive. When technical control is your focus, our technical SEO guide goes deeper on crawling and indexing.

Meta tags that no longer help

Some tags survive in old templates but do nothing useful today. The clearest example is the meta keywords tag. Google states plainly that it ignores the keywords meta tag, and has for many years, because it was abused for stuffing. Filling it in is harmless but pointless.

Other legacy tags to skip or use with care:

  • meta refresh redirects are discouraged; a server-side 301 redirect is cleaner and more reliable.
  • revisit-after is not honored by major search engines.
  • author and generator are fine for record keeping but carry no ranking weight.

Social and Open Graph meta tags

A related family of meta tags controls how your link looks when shared on social platforms. Open Graph tags such as og:title, og:description, and og:image shape the preview card on many networks, while Twitter Card tags do the same for that platform. These are not Google ranking factors, but a compelling share preview drives more clicks and referral traffic, which supports your wider goals.

Keep social titles and descriptions consistent with your on-page ones, and always specify an image with clear dimensions so previews do not render blank.

How to audit your meta tags

You do not need a paid tool to check meta tags. Several free options cover almost everything:

  • Browser view-source: right-click any page and view the source to read the raw head. Fast for spot checks.
  • Google Search Console: the URL Inspection tool shows how Google sees a page, including indexing status driven by your robots directives.
  • Screaming Frog SEO Spider (free tier): crawls up to 500 URLs and flags missing, duplicate, or over-length descriptions.
  • PageSpeed Insights: confirms your viewport tag and mobile rendering.

If you want a broader picture of on-page issues, pair a meta audit with a full site scan using our walkthrough on free SEO testing tools, and cross-check individual pages with a free SEO checker.

Warning: Before pushing meta tag changes site-wide from a template, test on a single page first. A misplaced noindex in a shared header can quietly deindex your entire site, and the damage is often invisible until traffic drops.

Putting it together: a clean head

A well-formed head for a typical content page looks like this in principle: a UTF-8 charset declaration first, then the viewport tag, a unique and descriptive title, a tailored meta description, an appropriate robots directive, a canonical link, and your Open Graph tags. Everything else is optional. Keep it lean, keep every value unique per page, and revisit descriptions whenever a page's focus shifts. For the wider on-site picture, our guide to web SEO shows how meta tags fit alongside content, structure, and speed.

Frequently asked questions

Are meta tags a Google ranking factor?

Most are not direct ranking factors. The meta description and social tags influence click-through rather than position, and the meta keywords tag is ignored entirely. The exceptions that affect visibility are the robots meta tag, which controls whether a page is indexed, and the viewport tag, which supports mobile-friendliness.

What is the difference between a meta tag and a title tag?

The title tag uses the <title> element, not the <meta> element, and it sets the clickable headline in search results and the browser tab. A meta description is a separate <meta> tag that provides the supporting snippet below the title. Both live in the head and work together.

How long should a meta description be?

Aim for roughly 120 to 160 characters. Longer descriptions get truncated on most devices, and shorter ones may waste the space you have to persuade a searcher. Write for clarity first and length second.

Should I still fill in the meta keywords tag?

No. Google confirms it ignores the meta keywords tag, and including it can even hint at your keyword strategy to competitors. Spend that effort on a strong title, description, and page content instead.

Why does Google show a different description than the one I wrote?

Google often rewrites snippets to match the exact query a person searched. It may pull a more relevant sentence directly from your page. You cannot force your description to appear, but writing a strong, on-topic one improves the odds and gives Google better material to work with.

Have a question or a topic to suggest?

We read every message. Tell us what you would like to see next.

Get in touch

Written by 404Pulse Editors

Notes on performance, uptime and the web, one post at a time. More about this blog.