Meta Tags, Part One: Describe the Page Before Optimising It

Editorial illustration.

Originally published 16 June 2023; rewritten and reviewed on 15 October 2026.

A browser tab reads “Home,” and every page in Google’s search results shows the exact same two-line company tagline. That happens on far more live business sites than you would expect—usually because someone cloned a starter template or installed a CMS theme and never wired the metadata fields to the actual page content.

Before treating that as an SEO mystery, treat it as a publishing problem. A page’s metadata exists to help a human decide whether clicking that link will answer their question.

Write for the decision to open the page

Every distinct URL should have a specific <title> and <meta name="description"> that match what is actually on the page. A service landing page, a technical tutorial, and a contact page serve completely different intents; inheriting a single global description across all three wastes the one preview snippet you get before someone clicks.

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Importing CSV Data into MySQL — MZULKAMAL</title>
  <meta name="description" content="A staging workflow for validating CSV columns and encodings before importing them into MySQL.">
  <link rel="canonical" href="https://mzulkamal.com/blog/import-csv-mysql/">
</head>

Keep titles concise enough that the key phrase is not chopped off in a narrow mobile result or a crowded browser tab—roughly 50 to 60 characters is a practical rule of thumb, though Google measures in pixels rather than strict character counts. For descriptions, 140 to 155 characters usually fits cleanly without truncation.

Even with a carefully written description, search engines may still generate their own snippet from your body text if it matches the user’s query better. That is normal, not a sign that your tag is broken.

Keep technical and editorial tags separate

Developers often lump every <meta> tag under “SEO,” even though several of them have nothing to do with search ranking. charset="UTF-8" prevents broken characters in Malay or English punctuation. viewport stops mobile browsers from rendering a zoomed-out desktop layout. A canonical link tells crawlers which URL is the primary version when query parameters like ?utm_source= or ?page=1 are floating around.

On the other hand, <meta name="keywords"> is dead weight. Years ago, people stuffed comma-separated keyword lists into that tag hoping to rank. Google explicitly states that Google Search does not use the keywords meta tag for indexing or ranking. Leaving it out keeps your templates cleaner and removes a pointless chore for content editors.

One quiet bug to watch for when rendering dynamic titles and descriptions in PHP, Razor, or Twig: unescaped quotes or ampersands. If a product title contains "24-inch" and your template prints it raw into content="...", the attribute breaks at the first quote and the rest of the description disappears from the DOM. Always HTML-encode metadata values just as you would body text.

Inspect the rendered HTML, not just the CMS form

Do not rely solely on a CMS SEO plugin’s green traffic light to confirm your tags are working. Staging sites get pushed to production with <meta name="robots" content="noindex, nofollow"> still sitting in the header, or a caching plugin serves an older template without the new description.

Check a handful of representative URLs directly from the terminal or View Source:

curl -sL https://example.com/services/ | grep -iE '<title|<meta name="(description|robots)"|<link rel="canonical"'

Look for four things: missing titles, duplicate descriptions across different pages, truncated or broken HTML attributes, and accidental noindex directives. Making that quick check part of your launch checklist catches far more real-world issues than agonising over keyword density percentages.