In short
The H1 is the page's main visible heading, marked up with the <h1> element. In a few words, it says what the page is about, for visitors and search engines alike. Once this check is done, every indexable page shows a single H1, in text, at the top of the main content, which accurately describes the page and stays consistent with its title.
Why it matters
The H1 is the first landmark a visitor reads when arriving from a search result: it confirms they are in the right place. Search engines use it too. Google states that, to generate the headline shown in its results (the “title link”), it looks in particular at the page's main visual title and at heading elements such as <h1>, and recommends making it clear which text is the main title. Its “How Search works” page specifies that a query word appearing in headings or body text can make the page more relevant.
Screen readers let users jump straight to the H1 to find the start of the content. Generative engines split pages into passages: in its advice on appearing in AI search answers, Microsoft recommends an H1 that matches or reflects the page title and clearly introduces what follows.
What breaks without a clear H1:
- a logo, a slogan or “Welcome” takes the H1, and the real topic is marked up nowhere;
- the H1 is missing from the HTML because the heading is an image or styled text in a
div; - several competing H1s blur the topic, often because the template shows one and the content adds another.
The number of H1s is not a ranking rule. The HTML standard allows several <h1> elements and Google states that there is no ideal number of headings. A single H1 per page remains MDN's recommendation and the convention that gives the most readable structure.
What it improves
- Understanding of the topic The H1 is one of the signals that tell search engines the main topic. A real but modest effect, never enough on its own.
- Title link in Google A clear H1, consistent with the title, limits unwanted headline rewrites.
- Bounce rate and conversion Visitors know within a second that they are on the right page.
- Accessibility The axe rule
page-has-heading-one(a best practice, not a WCAG criterion) is satisfied and heading navigation works. - AI answers An explicit topic makes splitting into passages easier. No guarantee of being cited.
How to check
Read the H1s present in the initial HTML, the one robots receive before any JavaScript:
curl -s https://example.com/page/ | perl -0777 -ne 'while (/<h1\b[^>]*>(.*?)<\/h1>/gis) { (my $t = $1) =~ s/<[^>]+>//g; $t =~ s/\s+/ /g; print "H1 : $t\n" }'
Expected result: a single line that describes the page. No line means there is no H1 in the initial HTML; if it appears in the browser, it is injected by JavaScript (see inspect the initial HTML (opens in a new tab)).
In the browser, open the developer tools console (F12) and paste:
document.querySelectorAll('h1').forEach((h) => console.log(h.textContent.trim(), h));
Other ways:
- W3C validator: the Nu HTML Checker with the outline option shows the list of the page's headings (replace the address in the field).
- Screaming Frog: the H1 tab lists pages with a missing, duplicate or multiple H1 across the whole site.
- axe DevTools or WAVE: flag a page without a level-one heading. See test with axe, WAVE or Lighthouse (opens in a new tab).
- WordPress block editor: the Outline tab of the document overview warns that “Multiple H1 headings are not recommended” or reminds you that the theme may already use an H1 for the post title.
Check one instance of each template: homepage, category, product or service page, article, contact page, internal search results.
How to implement
Before you start
The rules apply to every environment:
| Rule | Compliant | Non-compliant |
|---|---|---|
| One visible H1 per page | Boiler servicing in Nantes |
No H1, or three |
| In text | HTML text styled with CSS | Heading embedded in a banner image |
| Specific to the page | Loose green tea |
Our products, Welcome |
| At the top of the main content | First heading in <main> |
H1 in the footer or sidebar |
| Consistent with the title | Same topic, free wording | Title and H1 about two different things |
The H1 does not need to be identical to the title: the title can add the brand or a selling point, while the H1 stays shorter and more natural. See write a unique title for each important page (opens in a new tab).
Do not use a visually hidden H1 to “add a keyword”: hidden text that differs from the visible heading falls under manipulative hidden text (opens in a new tab).
WordPress
Versions WordPress 6.4 to 7.1; Elementor 3.x for the page builder.
Block theme (Twenty Twenty-Five and later): Appearance > Editor > Templates. Open the “Single Posts”, “Pages” and “Archives” templates. Select the Title block (or Archive Title) and choose H1 in the toolbar's level selector. In the header part, the Site Title block is an H1 by default: set its level to “P” (paragraph). Twenty Twenty-Five already does this.
Classic theme: the template sets the level. In the child theme's single.php, page.php and archive.php:
<?php the_title('<h1 class="entry-title">', '</h1>'); ?>
<?php the_archive_title('<h1 class="page-title">', '</h1>'); ?>
Many classic themes also mark up the site name as <h1> on the homepage, in header.php. If your homepage has its own heading, replace that <h1> with a <p> in the child theme.
In the content: the post title is already the H1. Start subheadings at H2 level and do not insert an H1 Heading block in the body.
Page builders: in Elementor, the Heading widget offers the HTML Tag option in the Content tab (H1 to H6, div, span, p). Check that the theme does not show a second H1 above the built page.
Shopify
Versions Shopify admin, all plans, Horizon and Dawn themes, November 2026.
Shopify generates the H1 from the title entered for a product, collection, page or blog post: take care with that field. The usual weak spot is the homepage, whose H1 depends on the theme. Before any code change, go to Online Store > Themes and duplicate the published theme to keep a copy. After the change, check a product page: it must keep its single <h1> with the product name.
Horizon theme
Horizon, the default theme for new stores, and the themes derived from it write a visually hidden H1 containing the store name on the homepage. Text blocks only produce a heading if the heading format is applied to the text itself: the block's typography preset (H1 to H6) only changes the appearance.
- On the theme, open the “…” menu, then “Edit code”, and open
sections/header.liquid. - Delete the block that writes the hidden H1:
{%- if request.page_type == 'index' -%}
<h1 class="visually-hidden">{{ shop.name }}</h1>
{%- endif -%}
- In the theme editor, add a section with a Text block at the top of the homepage, type the heading (“Organic loose-leaf teas, sourced directly from growers”) and apply the Heading 1 format to it in the text field.
Dawn theme
In Dawn and many themes derived from it, the logo or store name is marked up as <h1> on the homepage, and the Image banner or Rich text sections produce <h2> elements: the “Heading size” setting only changes the appearance, not the level.
- On the theme, open the “…” menu, then “Edit code”, and open
sections/header.liquid. - Replace both occurrences of
<h1 class="header__heading">with<div class="header__heading">, and the matching</h1>with</div>. - In the theme editor, add a “Custom Liquid” section at the top of the homepage:
<div class="page-width">
<h1 class="h1">Organic loose-leaf teas, sourced directly from growers</h1>
</div>
PrestaShop
Versions PrestaShop 8 and 9, Classic and Hummingbird themes.
In the Classic and Hummingbird themes, the logo is marked up as <h1> on the homepage (templates/_partials/header.tpl, condition $page.page_name == 'index'). In a child theme, replace this <h1> with a div and put the homepage heading in a text module, as an H1. Product pages already show the product name as an H1 (templates/catalog/product.tpl). Clear the cache in Advanced Parameters > Performance.
Wix
Versions Wix Editor and Wix Studio, all plans, November 2026.
Text selected in the editor gets a Heading 1 to Heading 6 or Paragraph style; the Heading 1 style produces an H1. Keep a single Heading 1 per page and use the text settings to choose the HTML tag independently of the appearance when the design requires it. The exact labels differ between the Wix Editor and Wix Studio: refer to the Wix help center.
Squarespace
Versions Squarespace 7.1, all plans, November 2026.
The title of blog posts and product pages is generated by the template. On regular pages, the H1 comes from a text block formatted as “Heading 1”: check that there is one, and only one, at the top of the page.
Webflow
Versions Webflow Designer, all plans, November 2026.
Select the Heading element and choose its tag (H1 to H6) in its settings. In a collection (CMS) template, bind the H1 to the Name field or to a dedicated field so that each page has its own heading.
Laravel
Versions Laravel 10 to 13.
Put the H1 in the page view, not in the layout, so that it changes on every page:
@extends('layouts.app')
@section('title', $post->seo_title ?? $post->title)
@section('content')
<article>
<h1>{{ $post->title }}</h1>
{!! $post->body_html !!}
</article>
@endsection
If the body is written in Markdown, a # Title typed by a writer creates a second H1. Demote it at render time:
$html = Str::markdown($post->body);
$html = preg_replace('/<(\/?)h1\b/i', '<$1h2', $html);
Lock the rule in with a test:
public function test_article_page_has_a_single_h1(): void
{
$post = Post::factory()->create();
$response = $this->get(route('posts.show', $post));
$response->assertOk();
$this->assertSame(1, substr_count($response->getContent(), '<h1'));
}
Next.js
Versions Next.js 15 and 16 (App Router).
The title is set in the metadata, the H1 in the page component:
// app/blog/[slug]/page.tsx
import { getPost } from '@/lib/posts'
export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }) {
const { slug } = await params
const post = await getPost(slug)
return { title: post.seoTitle ?? post.title }
}
export default async function Page({ params }: { params: Promise<{ slug: string }> }) {
const { slug } = await params
const post = await getPost(slug)
return (
<article>
<h1>{post.title}</h1>
{/* content */}
</article>
)
}
With @next/mdx, demote the content's # headings in mdx-components.tsx:
import type { MDXComponents } from 'mdx/types'
const components = {
h1: ({ children }) => <h2>{children}</h2>,
} satisfies MDXComponents
export function useMDXComponents(): MDXComponents {
return components
}
Render the H1 on the server (server component, SSR or static generation) so that it is in the initial HTML.
Astro
Versions Astro 5 to 7.
Put the H1 in the content layout, fed by the front matter:
---
// src/layouts/Article.astro
const { title } = Astro.props;
---
<article>
<h1>{title}</h1>
<slot />
</article>
The collection's Markdown files then start at the ## level.
Common mistakes
- The logo as H1 on every page: every page carries the same H1, the brand name, and the real heading is relegated to H2.
- A generic H1: “Home”, “Blog”, “Products”, “Welcome to our website”.
- The heading in an image: a banner with embedded text provides no H1, even with an
altattribute. - Two H1s from template and content: the theme shows the post title as H1 and the writer starts the text with another H1.
- An H1 hidden with CSS to place keywords, different from the visible heading.
- An H1 shown only on mobile or only on desktop: the mobile version, the one Google indexes, must show the same heading. See check mobile/desktop content parity (opens in a new tab).
- Confusing size and level: choosing H1 to get large text, or a “small” style that changes the level. Size is set in CSS.
Frequently asked questions
Can a page have several H1s?
Yes, it is technically allowed: the HTML standard permits several h1 elements and Google states that there is no ideal number of headings. A single H1 per page nevertheless remains MDN's recommendation and the clearest convention, for screen readers and search engines alike. Several H1s are mostly a problem when they come from a badly configured template, for example a logo marked up as H1 above the real heading.
Should the H1 be identical to the title tag?
No, the H1 and the title tag do not need to be identical, but they must announce the same topic. The title, shown in results, can add the brand or a selling point and is subject to display length constraints. The H1, read on the page, stays short and natural. Google compares both sources to generate the title link: consistent texts limit unwanted rewrites.
Does a missing H1 hurt SEO?
A page without an H1 is not penalized as such: Google can identify the main visual title even when it is poorly marked up. But the page loses a simple signal about its topic, makes screen reader navigation harder and leaves more room for misinterpretation. Adding an explicit H1 is quick and risk-free, and axe's page-has-heading-one accessibility rule recommends it.
Should the logo be the H1 on the homepage?
That is not ideal. Many themes, including Dawn on Shopify and Classic on PrestaShop, mark up the logo as H1 on the homepage: the main heading then becomes the brand name, often an image. A text H1 that describes the business is better, for example “Plumbing and heating contractor in Nantes”, with the logo left as a simple link to the homepage.
Resources
- MDN: heading elements h1 to h6developer.mozilla.org
- Google Search Central: Influencing title linksdevelopers.google.com
- Google Search Central: SEO Starter Guidedevelopers.google.com
- Google: How Search ranks resultsgoogle.com
- Microsoft Advertising: Optimizing your content for inclusion in AI search answersabout.ads.microsoft.com
- Deque: axe rule page-has-heading-onedequeuniversity.com
- Shopify Help Center: Adding keywords for SEOhelp.shopify.com
- Next.js: How to use Markdown and MDXnextjs.org
Updated on
Topic checklist (PDF)