← Back to blog
How to Use Header Tags H1 and H2 for Better On Page SEO

How to Use Header Tags H1 and H2 for Better On Page SEO

By The RankLoco Team · October 21, 2026

To use header tags for SEO, give every page exactly one H1 that contains your primary keyword and describes the page, then break the body into logical sections with H2s that carry supporting keywords and answer specific questions. Use H3s to nest subpoints under an H2, never skip levels, and write every heading for a human skimming the page first and a crawler second. Done right, your heading structure makes content easier to read, easier for Google to understand, and more likely to win featured snippets.

What Header Tags Actually Do for SEO

Header tags (H1 through H6) are HTML elements that define the hierarchy of your content. They are not a magic ranking lever, but they do three jobs that affect rankings indirectly and directly.

  • They tell Google what the page is about. Your H1 and H2s give crawlers a quick outline of your topic and subtopics before they parse the full body text.
  • They improve readability and dwell time. Scannable headings keep people on the page longer. Lower bounce and better engagement are signals Google notices over time.
  • They feed featured snippets and People Also Ask. Google frequently pulls snippet answers from text that sits directly under a clear, question-style H2 or H3.

Think of your headings as the table of contents for a page. If someone read only your H1 and H2s, they should understand the whole argument. That is the test.

The One H1 Rule and Why It Still Matters

Every page should have exactly one H1. It is the title of the page, the biggest promise, the thing that tells both the reader and the search engine what they are looking at.

How to write an H1 that works

  • Include your primary keyword naturally. If your target keyword is "how to use header tags for SEO," your H1 should contain that phrase or a very close variant.
  • Keep it under about 60 characters. Long H1s read like a run-on sentence and get truncated when the H1 doubles as a visible title.
  • Make it specific. "Header Tags" is weak. "How to Use Header Tags H1 and H2 for Better On Page SEO" tells the reader exactly what they will get.
  • Match search intent. If people are searching a how-to, your H1 should promise a how-to, not a definition.

Note: your H1 and your SEO title tag do not have to be identical. The title tag shows in search results and the browser tab. The H1 shows on the page. Many CMS platforms set them to the same text by default, but you can and often should tune them separately so the title tag is click-optimized and the H1 is reader-optimized.

Common H1 mistakes to avoid

  • Using two or more H1s on a single page (older HTML5 rules allowed it, but for SEO clarity, stick to one).
  • Wrapping your logo in an H1 on every page so the site name becomes the H1 sitewide.
  • Leaving the H1 blank or hiding it with CSS.
  • Stuffing three keyword variations into one H1. Pick the main phrase and write for humans.

How to Structure H2s for Topics and Keywords

H2s are where most of your on-page optimization happens. Each H2 opens a new section of your page and should map to a subtopic or a question your reader actually has.

Build H2s around real search questions

Before writing, pull the questions people ask around your topic. Google Autocomplete, the People Also Ask box, and your Search Console queries are goldmines. Our guide on how to find long tail keywords using Google Autocomplete and People Also Ask walks through this. Turn the best questions into H2s, then answer each one in the paragraph below.

For example, instead of a vague H2 like "More Tips," use "How to Structure H2s for Topics and Keywords." The second version carries keywords and sets a clear expectation.

Use secondary and related keywords in H2s

Your H1 owns the primary keyword. Your H2s should cover secondary keywords and semantic variations. If your page targets "header tags for SEO," good H2s might include phrases like "H1 rule," "H2 structure," "heading hierarchy," and "featured snippets." This signals topical depth without stuffing the same phrase repeatedly.

This approach ties directly into building out complete topic coverage. If you are planning a cluster of related articles, see how to build topic clusters and pillar pages for SEO so your headings support a larger content strategy.

Heading Hierarchy: Do Not Skip Levels

Headings form a nested outline. The order matters to screen readers, to crawlers, and to anyone scanning. The rule is simple: do not jump from H2 to H4 without an H3 in between.

LevelUse forExample
H1Page title (one only)How to Use Header Tags for SEO
H2Main sectionsHow to Structure H2s for Topics
H3Subpoints inside an H2Build H2s around real questions
H4Rarely needed; details inside H3Example edge cases

A clean hierarchy looks like a proper outline: H1, then H2, then H3 under that H2, then another H2, and so on. If you find yourself needing H4s and H5s often, your page is probably too complex and should be split into multiple pages.

Why skipping levels hurts you

Styling is not structure. Do not pick H3 because it "looks the right size." Use CSS for appearance and headings for meaning. Screen readers navigate by heading level, so a broken hierarchy is an accessibility problem as well as an SEO one. Google's crawlers interpret skipped levels as a confused outline, which weakens the topical signal you are trying to send.

How Headings Help You Win Featured Snippets

Featured snippets are often extracted from content that sits right below a clear heading. A question-form H2 followed by a tight, direct answer in the first sentence is the exact pattern Google likes to lift.

Format it like this: write an H2 that matches the query ("How do you write an H1 for SEO?"), then answer in the first 40 to 60 words of the paragraph below it, then expand with detail. Lists and tables under headings also win snippets. We cover the full playbook in our guide on how to write FAQ sections that win featured snippets.

Header Tag Checklist for Every Page

  1. One H1 per page that includes the primary keyword and describes the content.
  2. H1 under 60 characters and written for humans.
  3. H2s for each main section, carrying secondary keywords and phrased as topics or questions where it fits.
  4. H3s nested properly under their parent H2, never standing alone out of order.
  5. No skipped levels (H2 to H4 with nothing between is a bug).
  6. Keywords used naturally, not forced into every heading.
  7. Headings describe the content below them accurately, no clickbait that the paragraph fails to deliver.
  8. Scannable outline test: read only the headings and confirm the page still makes sense.

You can catch most heading problems with an on-page audit. RankLoco flags missing H1s, multiple H1s, and empty headings across your site so you are not checking page source by hand.

Headings and Keyword Placement Without Overdoing It

Keyword stuffing in headings is a real risk. If every H2 starts with the same keyword, it reads like spam and dilutes the value. Vary your phrasing. Use the exact keyword once or twice across your headings, then rely on related terms and natural language for the rest.

The goal is to write headings a human would actually find helpful. This is the same principle behind writing content that ranks without sounding robotic, which we break down in how to write SEO friendly blog content that reads naturally. Headings are part of that readability equation.

A quick before and after

Before (stuffed): H2: Header Tags for SEO. H2: Best Header Tags for SEO. H2: Using Header Tags for SEO Tips.

These three headings fight each other and signal nothing distinct.

After (clear): H2: The One H1 Rule and Why It Matters. H2: How to Structure H2s for Topics. H2: Heading Hierarchy Mistakes to Avoid.

Each heading covers a different angle and still reinforces the topic.

Auditing Headings on Existing Pages

If you are optimizing older content, headings are one of the fastest wins. Open a page and check: Is there exactly one H1? Do the H2s cover the questions people search? Is the hierarchy clean? Often an old post has a strong H1 but weak, generic H2s that bury the value.

Fixing headings pairs well with a broader content refresh. See how to update old blog posts to improve rankings and traffic for the full refresh process, and browse more guides over on the RankLoco blog. Adding a few question-style H2s with direct answers underneath is one of the highest-ROI edits you can make to a page that is stuck on page two.

Frequently Asked Questions

Can a page have more than one H1?

Technically HTML5 allows multiple H1s inside section elements, but for SEO clarity, use one H1 per page. A single H1 gives Google an unambiguous signal about the page's main topic and keeps your heading outline clean. Multiple H1s create confusion with no upside.

Do H1 tags need to match the title tag exactly?

No. The title tag appears in search results and should be written to earn clicks, while the H1 appears on the page and should serve the reader. They can share the same keyword and be slightly different in wording. Many platforms set them identically by default, but tuning each separately is better practice.

How many H2s should a page have?

There is no fixed number. Use as many H2s as the content needs to break into logical, scannable sections. A 1,500-word article might have five to eight H2s. The test is whether each H2 opens a genuinely distinct section, not whether you hit a count.

Do header tags directly improve Google rankings?

Headings are not a strong direct ranking factor on their own, but they help Google understand your content and improve readability, which influences engagement signals and your odds of winning featured snippets. Think of them as support that makes your actual content perform better rather than a standalone lever.

Should keywords always go in header tags?

Use keywords in headings where they fit naturally, especially in the H1 and a few key H2s. Do not force your target phrase into every heading. Over-optimized headings read like spam and dilute the signal. Clear, descriptive headings that happen to contain relevant terms beat keyword-stuffed ones every time.

What is the difference between H2 and H3 tags?

An H2 marks a main section of your page. An H3 marks a subpoint nested inside that H2. For example, an H2 might be "How to Structure H2s" and an H3 under it might be "Use secondary keywords in H2s." H3s should never stand alone without a parent H2 above them.

Keep reading

How to Optimize a Blog Post for a Keyword: A Step-by-Step Playbook How to Optimize a Blog Post for a Keyword: A Step-by-Step Playbook How to Do Keyword Clustering to Group Keywords by Search Intent How to Do Keyword Clustering to Group Keywords by Search Intent How to Build Local Citations for a Small Business How to Build Local Citations for a Small Business