How to Write the Perfect SEO Meta Tags
Meta tags are HTML elements in a page's <head> section that communicate information about the page to search engines and browsers. The title tag directly affects your search rankings; the meta description affects your click-through rate; the robots tag controls indexing. Getting these right is one of the highest-ROI activities in on-page SEO.
The Title Tag: Your Most Important Meta Element
The <title> tag defines the clickable headline shown in search results. It is one of the strongest on-page ranking signals Google uses. Rules for an effective title tag:
- Length: 50–60 characters. Google truncates at roughly 600px wide — longer titles are cut off with "…" in search results.
- Keyword placement: Put your primary keyword as close to the beginning as possible. The first words carry more weight.
- Format: Primary Keyword — Secondary Keyword | Brand Name. The brand name at the end identifies your site without dominating the keyword space.
- Uniqueness: Every page on your site should have a unique title. Duplicate titles confuse Google about which page to rank for which query.
- Clarity: Write for humans, not algorithms. The title is what people click on in search results — it should be compelling as well as keyword-rich.
Example good title: JSON Formatter Online — Free Beautifier & Validator | ToolsBox (56 characters)
The Meta Description
The meta description appears as the snippet text under your title in search results. Google may use it, or it may substitute text from the page body — but a well-written description increases your click-through rate when Google does display it.
- Length: 140–155 characters. Google truncates longer descriptions. Use the full length to maximise your message.
- Include the keyword: Google bolds keywords that match the search query in the description snippet. This draws attention and signals relevance.
- Include a call to action: "Free", "no signup", "instant" — words that communicate immediate value encourage clicks.
- Be specific: Tell the reader exactly what they will get. Vague descriptions ("Learn about X on our page") perform worse than specific ones.
- Uniqueness: Like titles, every page should have a unique description.
The Canonical Tag
The canonical tag (<link rel="canonical" href="...">) solves the duplicate content problem. It tells Google: "This is the master version of this content — attribute all ranking signals here."
You need canonical tags when:
- Your content is accessible at multiple URLs (www vs non-www, HTTP vs HTTPS, with vs without trailing slash)
- You have paginated content (/page/1, /page/2) with similar headings
- Products appear in multiple category paths (/electronics/phones vs /phones)
- You syndicate your content to other sites (tell Google yours is the original)
Always use absolute, full URLs in canonical tags: https://yourdomain.com/page/, not /page/.
The Robots Meta Tag
The robots meta tag controls crawling and indexing:
content="index, follow"— Default. Index this page and follow links on it.content="noindex, follow"— Do not index this page, but follow its links. Use for thank-you pages, tag pages, or admin pages.content="noindex, nofollow"— Ignore this page entirely. Use for login pages, cart/checkout pages, and internal utilities.content="noarchive"— Do not show a cached version in search results.
Viewport and Charset Tags
These are not SEO tags per se, but they are required meta tags for every page:
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
The charset tag prevents character encoding issues. The viewport tag tells mobile browsers how to render the page — without it, mobile browsers zoom out to show the desktop layout, which is terrible for user experience and hurts your Core Web Vitals scores.
Open Graph Tags for Social Media
Open Graph meta tags control how your page appears when shared on Facebook, LinkedIn, Slack, WhatsApp and other platforms. Without them, those platforms guess what to show — and usually get it wrong. The four essential Open Graph tags are:
<meta property="og:title" content="Page Title Here">
<meta property="og:description" content="150–200 character description.">
<meta property="og:image" content="https://yourdomain.com/social-image.jpg">
<meta property="og:url" content="https://yourdomain.com/page/">
<meta property="og:type" content="website">
The og:image should be at least 1200×630 pixels for ideal display across platforms. Use a distinct image per page — not a generic logo — to maximise click-through on social shares.
Twitter/X uses its own tags that mirror Open Graph:
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Page Title Here">
<meta name="twitter:description" content="Description here.">
<meta name="twitter:image" content="https://yourdomain.com/social-image.jpg">
Common Meta Tag Mistakes and How to Fix Them
| Mistake | Impact | Fix |
|---|---|---|
| Duplicate title tags across pages | Google can't tell pages apart, ranking signals split | Write unique titles for every page |
| Title over 60 characters | Truncated in search results with "…" | Rewrite under 60 chars with keyword near start |
| Missing meta description | Google pulls random text from the page — often ugly | Write a compelling 140–155 char description per page |
| noindex on a live page by mistake | Page disappears from search results | Audit robots meta tags monthly |
| Canonical pointing to wrong URL | Google indexes wrong version, splits ranking signals | Canonical should always self-reference the current URL |
| Missing viewport meta tag | Broken mobile rendering, Core Web Vitals penalty | Add <meta name="viewport" content="width=device-width,initial-scale=1"> |
Complete Meta Tag Template
Here is the minimal complete set of meta tags every page should have:
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Primary Keyword — Brand Name</title>
<meta name="description" content="140–155 character description with keyword.">
<link rel="canonical" href="https://yourdomain.com/page/">
<meta name="robots" content="index, follow">
<!-- Open Graph -->
<meta property="og:title" content="Primary Keyword — Brand Name">
<meta property="og:description" content="140–155 character description.">
<meta property="og:url" content="https://yourdomain.com/page/">
<meta property="og:image" content="https://yourdomain.com/og-image.jpg">
<meta property="og:type" content="website">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Primary Keyword — Brand Name">
<meta name="twitter:description" content="140–155 character description.">
<meta name="twitter:image" content="https://yourdomain.com/og-image.jpg">
</head>
Our Meta Tag Generator generates this complete block automatically — fill in your details and click copy. No memorising attribute names needed.
Generating Meta Tags Automatically
Our Meta Tag Generator creates a complete set of SEO meta tags with a live character count preview. Fill in your title, description, keywords, and author — and the tool outputs ready-to-copy HTML that you can paste directly into your page's <head>. Pair it with the Open Graph Tag Generator to also generate social sharing tags.
Generate SEO meta tags — free
Fill in your details and get complete, ready-to-copy meta tag HTML instantly.Frequently Asked Questions
What is the ideal length for a meta title tag?
50–60 characters is the recommended length. Google truncates titles in search results at approximately 600 pixels wide, which corresponds to 50–60 characters for most fonts. Your primary keyword should appear near the beginning of the title.
Does the meta description affect Google rankings?
Not directly. Google confirmed in 2009 that the meta description is not a ranking factor. However, a well-written description that includes the target keyword (which Google may bold in results) and a clear call to action improves click-through rate — which indirectly signals relevance to Google.
What is a canonical tag and why do I need it?
A canonical tag tells search engines which URL is the 'master' version of a page when the same content is accessible at multiple URLs. Without it, duplicate content can split your ranking signals across multiple URLs. Always use absolute URLs in canonical tags.
What does meta name='robots' content='noindex' do?
It instructs search engines not to index the page — it will not appear in search results. Use this for thank-you pages, admin pages, duplicate content pages, or any page you do not want Google to show in search results.
← Back to Blog | Related tool: Meta Tag Generator