Skip to content
Issue docs

More than one H1 heading

Suggestionmultiple_h1_headingsIssue 175

What is this issue?

This is advice, not a defect. The page has more than one <h1> heading.

HTML allows several, and Google has said it copes with them, so this deducts nothing. What it usually points at is a template marking something that is not the page's subject as an H1 — a logo, the site name in the header, a sidebar title, or every card title in a listing — beside the real heading.

For a page to pass:

  • It has exactly one <h1>, stating what the page is about.

A page with no H1 at all is a different finding, "Page has no H1 heading".

Why it matters

  • One clear statement of the topic. The H1 is the strongest on-page heading signal after the title. Several H1s dilute it: a search engine and a reader both have to work out which one is the page's subject.

  • Screen reader navigation. Users jump straight to the level-1 heading to find where the content starts. With a logo and a section label also marked as H1, that jump lands in the wrong place.

  • It is usually a template fault. The same extra H1 appears on every page built from that template, so one fix clears it everywhere.

Effect on the health score

None. This is a suggestion; it never deducts.

How to fix it

  1. Pick the H1 that states the page's topic. On an article it is the headline; on a product page the product name; on a category page the category name.

  2. Demote the others. A logo or site name in the header should not be a heading at all, or at most a styled <p> or <span>. Section titles become <h2>; card titles in a listing become <h2> or <h3>.

    <!-- Before -->
    <header><a href="/"><h1>Acme</h1></a></header>
    <main><h1>Running shoes</h1></main>
    
    <!-- After -->
    <header><a href="/" class="logo">Acme</a></header>
    <main><h1>Running shoes</h1></main>
  3. Fix it in the template, so every page using it is corrected at once.

Examples

Example 1: One H1

<header><a href="/" class="logo">Acme</a></header>
<main><h1>Running shoes</h1></main>

Passes.

Example 2: Logo marked up as an H1

<header><a href="/"><h1>Acme</h1></a></header>
<main><h1>Running shoes</h1></main>

Reported. Two H1s: "Acme" and "Running shoes".

Example 3: Every card is an H1

<main>
  <h1>Running shoes</h1>
  <article><h1>Trail runner</h1></article>
  <article><h1>Road racer</h1></article>
</main>

Reported. Card titles belong at <h2>.

How PixyScan detects this

  1. Every <h1> in the document is counted, wherever it sits — header, main content, article, footer.

  2. Reported when there are two or more. One finding per page.

  3. The H1s are listed. The finding carries the total count and the text of the first ten H1s (each clipped to 120 characters), because the useful question is which of them is the real one.

  4. Not reported on a page with one H1, or with none (that is "Page has no H1 heading").

What we store

Storage Level

Page Level


Database Table / Prisma Model

PageSeoBasicsData (page_seo_basics_data). The finding itself is stored on audit_issues.details.


Fields Used

Field Type Description
h1_count Int? How many <h1> elements the page has
heading_tree Json? Every <h1>–<h6> in source order: { tag, text }, text clipped to 200 characters
duplicate_elements Json? Includes { element: 'h1', value, count } when the page has more than one H1

Stored Fields on the finding

Field Type Description
h1Count Int How many H1s the page has
h1Texts Array The text of the first ten H1s, each up to 120 characters

Detection Dependencies

  • HTML Document — every <h1> element

Further reading