Skip to content
Issue docs

More than one meta description tag

Standardmultiple_meta_descriptionsIssue 134

What is this issue?

This check counts the <meta name="description"> tags in the page's <head> and reports it when there is more than one. A description tag that ends up in the body is not counted: Google reads the description from the head, so a body tag is inert rather than a second, competing description.

HTML defines the description as a standard metadata name, and a document must not contain more than one meta element with the same one. The first is what is used; anything after it is ignored.

For a page to pass this check:

  • The <head> declares exactly one meta description.

Example: a head with one description passes. A head with a generic site-wide description followed by the page's own, carefully written one fails — and the generic one is the one Google reads.

This is not the duplicate-description check (#67). That one is about two different pages carrying the same description. This one is about one page carrying two.

Why it matters

Nothing breaks. The page is crawled, indexed and ranked exactly as it would be with one description, which is why this is graded STANDARD rather than higher.

What goes wrong is the same quiet failure as two titles:

  • The description being used is not the one being edited. Two tags mean two writers — a theme and an SEO plugin, a layout and a page template. Somebody rewrites the description they can find, deploys, and the snippet in the search result does not change.
  • The generic one usually wins. The hard-coded site-wide description tends to live in the base layout, which renders first, so the page-specific one written for this page is the one that is discarded.
  • It is a symptom of two systems writing one head. Where there are two descriptions there are usually two titles and two canonicals.

Google composes its own snippet when it does not like the one it is given, so the practical effect is often that the site's snippet is ignored entirely — and the site owner cannot see why, because their markup does contain the description they wrote.

The fix is one deleted line, and the page is better for it.

How to fix it

  1. Find both writers. View the page source and search for name="description". The two tags are usually far apart: one in the base layout, one from the page template or an SEO module.

  2. Pick the one that should own it. Whichever system knows the most about the page keeps the tag. The other stops emitting one.

  3. Make the site-wide description a fallback, not a second tag. A layout should render a description only when the page did not supply one. That keeps the safety net without creating the ambiguity.

  4. Check the title and the canonical too. Two descriptions almost always travel with two titles from the same pair of writers.

  5. Do not remove the Open Graph description. og:description is a different tag for a different consumer and is not counted here.

Examples

Example 1: A site-wide description and a page description

Scenario: The base layout carries a generic description; the page template adds its own below it.

Fails because: the page declares two, and the generic one is used.

<head>
  <meta name="description" content="Acme — running shoes and apparel since 1987.">
  <meta name="description" content="The Trail Runner 3 in men's sizes 6–13, with free 60-day returns.">
</head>

Corrected version: the layout renders a description only when the page did not supply one.

<head>
  <meta name="description" content="The Trail Runner 3 in men's sizes 6–13, with free 60-day returns.">
</head>

Example 2: Other meta tags, which are not a problem

Scenario: A page with a description, a keywords tag and an Open Graph description.

Passes. These are three different metadata names for three different consumers.

<head>
  <meta name="description" content="Wide-fit running shoes for men.">
  <meta name="keywords" content="running shoes, wide fit">
  <meta property="og:description" content="Wide-fit running shoes for men.">
</head>

Example 3: An empty second tag

Scenario: A plugin emits content="" when it has nothing to say.

Fails, because the page still declares two description tags. An empty second tag is as ambiguous as a full one, and the fix is the same: emit nothing.

<meta name="description" content="Wide-fit running shoes for men.">
<meta name="description" content="">

How PixyScan detects this

  1. Counts the meta description tags in the head. Only <meta name="description"> elements inside <head> are counted, the way the title count is scoped. A description tag that ends up in the body is inert — Google reads the description from the head — and on the JavaScript engine a third-party script injecting one into the body is ordinary, so counting those would report pages that are perfectly correct.

  2. Reports when the count is above one. A page with none is the missing description check's business, not this one's.

  3. Reports which description wins. The finding carries the count and the content of the first tag — the one a search engine will actually read — so the row answers "which of them is live" without opening the page.

Other meta tags are not counted. <meta name="keywords">, <meta property="og:description"> and the rest are different names carrying different values, and a page may legitimately have all of them.

The same measurement is stored on the page's record, so the page report can show every element the page declares more than once, whether or not a finding was raised for it.

What we store

Storage Level

Page Level


Database Table / Prisma Model

PageSeoBasicsData — the measurement

audit_issues.details — the finding


Fields Used

Field Type Description
metaDescription String The first description found — the one that is used
hasDuplicateElements Boolean Whether the page declares any head element more than once
duplicateElements Json Each repeated element, with the winning value and the count

The finding carries:

Field Type Description
count Int How many description tags the page declares
metaDescription String The first one — the description that is actually used

The COUNT is scoped to the <head>; the stored metaDescription is the first description found anywhere in the document, which is what every other description check in the crawler reads.


Detection Dependencies

  • HTML Document

Note

The first tag's content is what is stored, both on the page row and on the finding, because that is the value a search engine reads. A page whose second description is the good one still shows the first here — which is the point.

Further reading