Skip to main content
New: 200+ SEO checks now available. See what's new
← All guides

Complete Guide to Meta Tags

Meta tags tell search engines and social platforms what your page is about. Get them right and you control how your content appears in search results and social feeds.

10 min readUpdated March 2026

1. Essential meta tags

Not all meta tags matter for SEO. Here is the minimal set every page needs:

HTML
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>Your Page Title — Brand Name</title>
  <meta name="description" content="Compelling 150-160 character description." />
  <link rel="canonical" href="https://example.com/page" />
</head>

2. The title tag

The <title> tag is the single most important on-page SEO element. It appears in search results, browser tabs, and social shares.

  • Length: 50-60 characters (Google truncates around 580px)
  • Format: Primary Keyword — Secondary Keyword | Brand
  • Unique: Every page must have a different title
  • Front-load: Put important keywords at the beginning
Google may rewrite your title tag if it thinks it does not match the page content. Write accurate, descriptive titles to keep control.

3. Meta description

The meta description is not a ranking factor, but it directly affects click-through rate from search results. Treat it as ad copy.

  • Length: 150-160 characters
  • Include a call to action ("Learn how", "Try free", "See examples")
  • Include the primary keyword (Google bolds matching terms)
  • Unique for every page — no duplicates
HTML
<meta name="description" content="Learn how to optimize your meta tags for SEO and social sharing. Includes code examples and a free audit tool." />

Check your meta tags across every page. Run a free audit with Dr Urls.

Check your site

4. Canonical tag

The canonical tag tells search engines which version of a page is the "original" when duplicate or similar content exists.

HTML
<link rel="canonical" href="https://example.com/page" />
  • Every page should have a self-referencing canonical tag
  • Use absolute URLs, not relative
  • Canonicalize URL parameters: ?sort=price should canonicalize to the base URL
  • Canonicalize across HTTP/HTTPS and www/non-www
Conflicting canonical and noindex signals confuse search engines. Never noindex a page that is the canonical target.

5. Robots meta tag

Control indexing and link-following behavior per page.

HTML
<!-- Allow indexing (default, no tag needed) -->
<meta name="robots" content="index, follow" />

<!-- Block indexing -->
<meta name="robots" content="noindex, follow" />

<!-- Block indexing and link following -->
<meta name="robots" content="noindex, nofollow" />

<!-- Prevent snippet in search results -->
<meta name="robots" content="nosnippet" />

6. Open Graph tags

Open Graph tags control how your page appears when shared on Facebook, LinkedIn, Slack, and other platforms.

HTML
<meta property="og:type" content="article" />
<meta property="og:title" content="Your Page Title" />
<meta property="og:description" content="Compelling description for social." />
<meta property="og:image" content="https://example.com/image.jpg" />
<meta property="og:url" content="https://example.com/page" />
<meta property="og:site_name" content="Brand Name" />
  • OG image should be 1200x630px for optimal display
  • Use absolute URLs for images
  • Test with the Facebook Sharing Debugger

7. Twitter Card tags

HTML
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Your Page Title" />
<meta name="twitter:description" content="Description for Twitter." />
<meta name="twitter:image" content="https://example.com/image.jpg" />
<meta name="twitter:site" content="@yourbrand" />

Want to see how your site stacks up? Run a free audit now.

Check your site

8. Viewport meta tag

The viewport tag is essential for mobile-friendly pages. Without it, mobile browsers render the page at desktop width.

HTML
<meta name="viewport" content="width=device-width, initial-scale=1" />
Never use maximum-scale=1 or user-scalable=no as they break accessibility by preventing zoom.

9. Common mistakes

  • Duplicate title tags across multiple pages
  • Missing meta descriptions (Google generates one, but it is often poor)
  • Relative URLs in canonical tags
  • Missing OG images (pages look blank when shared)
  • Using meta keywords (ignored by all major search engines since 2009)
  • Placing meta tags outside <head>

Related guides

Check your website now — free

Run a comprehensive audit across SEO, security, performance, and accessibility. No sign-up required.

Check your website
Complete Guide to Meta Tags | Dr Urls | Dr Urls