Skip to content

Menu

SEO Meta Tags Cheat Sheet: Title, Canonical, Robots, hreflang, Open Graph

Checked against Google Search and Open Graph Google Search Central docs and the Open Graph protocol (ogp.me), read on 28 Nov 2026 on 28 November 2026. Each section links to the official docs it was checked against.

This sheet is for web developers who own the <head> of a site and want to know what each tag actually does, according to Google's own documentation and the Open Graph protocol. It doesn't make ranking claims; where Google says a tag is a hint rather than a rule, the row says so. Everything here was read on Google Search Central and ogp.me on 28 November 2026.

When to use what

Start with the tags that change what Google does: a unique <title>, a self-referencing canonical on every indexable page, and noindex on pages you don't want in results. Those three fix most of what crawl reports complain about. A meta description is worth writing for important pages, but Google says it usually builds snippets from the page text and uses your description only when it summarises the page better.

Don't confuse crawling with indexing. robots.txt controls crawling. If you block a URL there, Google can't fetch it, so it never sees the noindex on it, and the bare URL can still show up in results. To keep a page out of search, allow crawling and use noindex. To merge duplicates, use a canonical or a redirect, not robots.txt.

Open Graph tags are for link previews in social apps and chat. Google does read og:title as one of its title sources and og:image as a thumbnail candidate, but they aren't a ranking switch. Use our meta tag generator to draft the head, the Open Graph preview to see a share card, the canonical URL checker on live pages and the robots.txt generator for crawl rules. The Next.js SEO post shows the same tags in a framework.

Snippet guidance is at https://developers.google.com/search/docs/appearance/snippet. Neither page sets a character limit; results are truncated to fit the device.

<title>Pricing | Example</title>

Give every page a unique, descriptive title; brand it once at the start or end

Try it: Title Tag CheckerFrom the docs, not run by us
<meta name="description" content="...">

Summarise the whole page; Google may use it as the snippet if it beats the page text

Try it: seo-meta-analyzerFrom the docs, not run by us
<p data-nosnippet>...</p>

Keep one part of the page out of snippets

From the docs, not run by us
og:title, <h1>, anchor text

Other sources Google may use for the title link when the <title> is weak

From the docs, not run by us

Google treats these as preferences. It may choose another canonical, and it generally prefers HTTPS unless signals conflict.

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

Name the preferred URL with an absolute URL, inside <head> only

Try it: canonical-url-checkerFrom the docs, not run by us
Link: <https://example.com/guide.pdf>; rel="canonical"

Set a canonical for non-HTML files such as PDFs, as an HTTP header

From the docs, not run by us
self-referencing canonical

Put a canonical pointing to itself on the canonical page too

From the docs, not run by us
301 redirect

The strongest signal, for retiring a duplicate URL for good

From the docs, not run by us
sitemap <loc>

A weak canonical hint; keep it consistent with your rel=canonical

Try it: Sitemap GeneratorFrom the docs, not run by us
<meta name="robots" content="noindex">

Keep this page out of search results; the page must stay crawlable for Google to see it

Try it: Meta Tag GeneratorFrom the docs, not run by us
<meta name="robots" content="noindex, nofollow">

Also tell Google not to follow links on the page; none means the same

From the docs, not run by us
<meta name="googlebot" content="nosnippet">

Target only Google's crawler instead of all crawlers

From the docs, not run by us
max-snippet:0 / max-image-preview:large / max-video-preview:-1

Limit or allow snippet length, image preview size and video preview seconds

From the docs, not run by us
X-Robots-Tag: noindex

Send the same rules as an HTTP header, for PDFs, images and other non-HTML files

From the docs, not run by us
unavailable_after: 2026-12-31

Drop the page from results after a date

From the docs, not run by us

Google reads up to 500 KiB, caches the file for up to 24 hours in general, and treats a 4xx response (other than 429) as "no restrictions".

User-agent: *\nDisallow: /admin/

Stop all crawlers fetching a path prefix; paths are case-sensitive

Try it: Robots.txt GeneratorFrom the docs, not run by us
Allow: /admin/help

Re-open a sub-path; the longest matching rule wins, and on a tie the less restrictive one

From the docs, not run by us
Disallow: /*.pdf$

Use * for any characters and $ for the end of the URL

From the docs, not run by us
Sitemap: https://example.com/sitemap.xml

Point crawlers to your sitemap with a full URL

Try it: Sitemap GeneratorFrom the docs, not run by us
Crawl-delay: 10

Not supported by Google; it ignores this line

From the docs, not run by us
<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/">

Point to a language or language-region version with a fully qualified URL

From the docs, not run by us
hreflang="x-default"

Name the fallback page for languages you don't serve, often a language picker

From the docs, not run by us
return links

Every version must list itself and all others; one-way links may be ignored

From the docs, not run by us
en-GB, not en-UK

Use ISO 639-1 language plus ISO 3166-1 region codes; UK and region-only codes are ignored

From the docs, not run by us

X (Twitter) card docs returned errors when fetched on 28 Nov 2026, so twitter:* tags are left out here; check them with our Twitter card validator.

<meta property="og:title" content="...">

Title of the shared object; one of the four required tags

Try it: Open Graph PreviewFrom the docs, not run by us
og:type / og:url / og:image

The other three required tags; og:type defaults to website on unmarked pages

From the docs, not run by us
og:image:alt / og:image:width / og:image:height

Describe and size the image; ogp.me says to include alt whenever there's an image

From the docs, not run by us
og:description / og:site_name / og:locale

Optional summary, site name and locale such as en_GB (default en_US)

From the docs, not run by us
article:published_time / article:author

Extra properties when og:type is article

From the docs, not run by us

Worked example: Retire a duplicate page and hide a staging copy the right way

Say https://example.com/shoes?sort=price duplicates /shoes, and a staging copy at staging.example.com keeps showing up in Google. A common first reaction is to block both in robots.txt. Here is the setup Google's docs actually support:

<!-- on /shoes and every parameter variant of it -->
<link rel="canonical" href="https://example.com/shoes">
<meta property="og:url" content="https://example.com/shoes">
# staging server: response header on every URL
X-Robots-Tag: noindex
# staging robots.txt: leave it permissive so the header can be seen
User-agent: *
Allow: /

The canonical tells Google which URL to show for the duplicate set. It is a strong hint, not an order, so keep internal links and the sitemap pointing at the same /shoes URL. On staging, the header applies to HTML and PDFs alike, and crawling stays allowed so Google can fetch each page and read noindex. If robots.txt blocked staging, Google couldn't read the header, and the URLs could stay indexed without content. Once the staging URLs drop out, protect staging with authentication; noindex hides pages from search, not from people. We didn't run this against Google, so check progress with the URL Inspection tool in Search Console.

Common mistakes

  • Blocking a page in robots.txt and adding noindex to it, expecting it to vanish from results.

    Pick noindex and allow crawling. Google can't read the tag on a page it isn't allowed to fetch.

  • Using relative canonicals like href="/shoes".

    Google's docs ask for absolute URLs, including https:// and the host.

  • Putting the canonical tag in <body> through a component that renders late.

    Render it in <head> in the initial HTML; Google ignores a canonical outside the head.

  • Using en-UK in hreflang.

    The region code for the United Kingdom is GB, so write en-GB. Reserved codes like UK are ignored.

  • Adding Crawl-delay to slow Googlebot down.

    Google doesn't support that field and ignores the line. Look at server capacity instead of relying on it.