New website or upgrading an existing one? Book a free video consultation.
Englishen
Login Configurator

Heading structure (H1, H2)

Headings (the tags H1 to H6) give a page structure, much like chapters and subchapters in a document. Readers, search engines, and screen readers all follow them, and increasingly so do AI summaries. A tidy heading structure tells the search engine what the page is about and makes the content easier to understand. Below is how it should be built, how to include keywords in it, and how to handle it in Magento.

One H1 per page

Every page should have exactly one H1 - the main heading that states the central topic and naturally contains the main keyword. In a store this is the product name on a product page and the category name on a category page. Multiple H1s on the same page confuse the search engine about the main focus, so avoid it.

A tidy hierarchy

Below the H1, use H2 for main sections and H3 for subsections - logically, like a document outline. Do not skip levels (for example from H2 straight to H4). Several H2s on a page are normal and desirable when you cover several related topics.

How to use keywords in headings

Headings are an excellent place for keywords - if you include them naturally, not forced:

  • H1 - the main keyword: include the page's central keyword in the main heading, but it should read like a real headline for a human, not a pile of words.
  • H2 - secondary and question headings: include secondary keywords and variations in H2. Question-form H2s that people actually search for are especially strong - about a third of featured answers take an H2 as the title. Under such a question H2, put a concise answer (around 40 to 60 words), which increases the chance of a featured answer and the "People also ask" section.
  • H3 - related and long-tail: naturally include related, supporting, and long-tail variations in H3.

Modern search engines look not at a single word but at topical relevance and context - so headings should naturally contain related concepts rather than repeating the same word. An example for a category: H1 "Running shoes"; H2 "How to choose the right running shoes?"; H2 "Running shoes for road and trail"; H3 "Running shoes for beginners". The guiding principle remains: write for people, include keywords naturally, and never stuff them.

Headings are for structure, not for looks

Do not use heading tags to make text look big or bold - that is what styling (CSS) is for. Use a heading only when it really is the heading of a section.

Accessibility and AI

Screen readers announce headings along with their level, so a tidy hierarchy lets visually impaired users move through the page and quickly find what they are looking for. The same clear structure improves the chance that your content appears in AI summaries, featured answers, and the "People also ask" section.

The difference between the title tag and the H1

The title tag is the title the search engine shows in the results and the browser tab; the H1 is the main heading on the page itself. They may differ: you often write the title for as many clicks as possible, and the H1 for clarity to the reader on the page. Both should match the content, but they need not be identical.

A common Magento mistake: a double H1

Many themes wrap the logo in the header in an H1 tag on every page - together with the product or category name, which is also an H1, this creates two H1s on the page. This confuses the search engine. The logo should be an H1 at most on the homepage (or not at all), while the main H1 on every page should belong to its central topic. Check the theme template and fix it if needed.

How to handle it in Magento

On a product page the product name is usually output by the template as an H1, and on a category page the category name; you edit the values on the product or category (with a separate content heading field if needed). The most important thing is to check the theme for a double H1 (the logo) and that the main heading of the page is not accidentally in an H2. Such fixes are made in the theme templates, and for more advanced control over headings a dedicated SEO module sometimes helps.

How to measure whether it is tidy

With a crawler (for example Screaming Frog) find pages without an H1, with multiple H1s, or with a wrong hierarchy and fix them. Check that the main heading of each page matches its topic and contains the keyword. The goal is simple: one clear H1 per page and a logical H2/H3 hierarchy that organises the content nicely.

Sources

Frequently Asked Questions

What are headings (H1, H2...) for and do they affect ranking?

Headings (the tags H1 to H6) give a page structure, much like chapters in a document. Readers, search engines, and screen readers all follow them, and increasingly so do AI summaries. A tidy structure tells the search engine what the page is about and makes it easier to understand and rank the content correctly; it also improves readability and accessibility.

How many H1s should a page have and which keyword belongs in it?

Exactly one H1 per page - the main heading that states the central topic and naturally contains the page's main (primary) keyword. In a store this is the product name on a product page and the category name on a category page. The H1 should read like a real headline for a human, not a pile of words; multiple H1s on a page confuse the search engine about the main focus, so avoid it.

How do I use keywords in headings?

In the H1 the main keyword, in H2 secondary words and variations, in H3 related and long-tail ones - always naturally, without stuffing. Question-form H2s that people search for are strong: about a third of featured answers take an H2 as the title, so under such a question H2 put a concise answer (around 40 to 60 words). Modern search engines look at topical relevance and context, not a single word, so headings should naturally contain related concepts. Example: H1 Running shoes; H2 How to choose the right running shoes?; H2 Running shoes for road and trail; H3 Running shoes for beginners. Do not skip levels (H2 -> H4) and do not use headings for looks.

What is the difference between the title tag and the H1?

The title tag is the title the search engine shows in the results and the browser tab; the H1 is the main heading on the page itself. They may differ: you often write the title for as many clicks as possible, and the H1 for clarity to the reader on the page. Both should match the content, but they need not be identical.

I have two H1s - how do I fix it in Magento?

A common cause is a theme that wraps the logo in the header in an H1 on every page, while the product or category name is also an H1 - creating two H1s. The logo should be an H1 at most on the homepage (or not at all), and the main heading on every page should belong to its topic. The fix is made in the theme template; also check that the main heading of the page is not accidentally in an H2. With a crawler find pages without an H1, with multiple H1s, or with a wrong hierarchy.

Stop browsing. Start selling. Contact me now at anze@degriz.net.

Access Premium Content for Free

Subscribe to our newsletter and get free access to premium content. Discover valuable insights and exclusive resources available only to our subscribers.

Privacy Policy: Newsletter Subscription

By entering your email address, you are subscribing to the newsletter, through which Degriz will inform you about new online and in-store offerings, marketing activities, and other promotions.

By subscribing to the newsletter, you are also enrolled in the benefits database that Degriz offers to its users.

For the newsletter subscription, Degriz d.o.o. collects the following information: email address, IP address, and if you subscribe as a registered member, your name, surname, address, and phone number.

After submitting the form with your email address, you will receive a confirmation message at the specified address – by confirming this, you will be subscribed to the Degriz newsletter until you unsubscribe (so-called opt-in approval). You can request, in writing or by clicking the Unsubscribe button in the newsletter, that the data controller permanently or temporarily stops using your personal data for direct marketing purposes. Your request will be fulfilled within 15 days of receiving it, as prescribed by law. You can also request the transfer or access to your data.

Degriz d.o.o. is committed to protecting your data in accordance with the legislation governing personal data protection.

The sender of the newsletter and controller of your personal data is: Degriz, d.o.o., Gorica pri Šmartnem 45a, 3000 Celje, SI 67287743

Check out the full Privacy Policy

Newsletter

My name is Anže, and I am a Magento certified expert in solutions and a creator of multiple award-winning online stores.

I am the architect behind all Degriz projects. You will surely come across me if we collaborate. Even though the phone keeps ringing, you can always tap me on the shoulder if you need advice regarding online stores and their functioning.

I specialize in building custom online stores and I am a master of unique techniques to enhance conversion on your website.

© 2010 - 2026 Degriz. All rights reserved. Built with love on Magento.
Partial use of the content is permitted with mandatory attribution. The content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0) or under our own license.