Blogging & SEO

How to Write the Perfect H1 Tag for SEO

26 Nov 2026 · 5 min read

Getting the H1 tag for SEO right matters more than most beginners realise: it is a small piece of code with an outsized effect on your page. It is the main heading that tells readers and search engines what the page is about, and it is one of the most powerful on-page SEO elements you have. Yet many sites get it wrong, using several H1s, vague headings, or none at all.

This guide explains what an H1 is, why it matters, and the exact rules for writing one that serves both your readers and search engines.

What Is an H1 Tag?

An H1 is an HTML tag that marks the main heading of a web page. HTML has six heading tags, from H1 to H6. The H1 is the most important, and the H6 is the least. They are usually formatted from largest to smallest, so the H1 is normally the biggest text on the page.

How to Write the Perfect H1 Tag for SEO

In code, an H1 looks like a heading wrapped in opening and closing tags. You can see one yourself by opening any good-quality web page and viewing its source code. The text inside the H1 is usually the title of the article or the main heading at the top of the page, and it gives the reader an immediate sense of what they are about to read.

Why H1 Tags Matter for SEO

H1 tags have always been a major ranking factor. Search engines use them to understand the topic and structure of a page, and they treat the H1 as a strong signal of what the page is about. Title tags are often ranked as the most important on-page factor after content itself, and the H1 works closely with the title: many pages use the same text for both.

The H1 also matters for readers. It is usually the most visually prominent text on the page, so it is the first thing a visitor reads after the title in the search results. A clear H1 confirms that the visitor has arrived at the right page. A vague or missing H1 leaves them guessing, and many will simply leave.

Rule 1: Use Only One H1

Every page needs only one H1 tag. There is no reason to use more than one. A single H1 gives the page a clear main topic, which helps both readers and search engines understand what it is about. Multiple H1s dilute that signal and confuse the structure of the page.

Use H2 tags for the main sections of the page, and H3 tags for subsections within them. That hierarchy, one H1, then H2s, then H3s, creates a clear outline that search engines can follow and readers can scan. If your page template puts an H1 on something other than the main heading, such as a logo or a sidebar title, fix that first.

Rule 2: The H1 Should Describe the Page

At the most basic level, the H1 should describe what the content is about. It is often similar to, or the same as, the title tag, and it is usually the title of the blog post or article. A reader who sees it should know immediately what they are going to read.

Make the H1 specific rather than clever. A heading that says exactly what the page covers will serve your readers and your rankings better than a witty phrase that leaves the topic unclear. If your page is a guide to a topic, say so. If it is a comparison, name both sides. Clarity beats creativity in a heading.

Rule 3: Keep It the Right Length

An H1 that is too short wastes valuable space, and one that is too long dilutes its power. A useful range is roughly 20 to 70 characters: long enough to describe the topic and include your main keyword, short enough to read at a glance. If your H1 and title tag are the same, pay extra attention, because title tags have their own length limits in the search results.

Rule 3: Keep It the Right Length

Include your main keyword in the H1 where it fits naturally. The H1 is one of the first places search engines look for the page's topic, so a keyword placed there carries real weight. But do not force it: if the keyword makes the heading awkward, rewrite the heading so it reads naturally and still covers the topic.

Rule 4: Make It Appeal to Readers and Search Engines

A good H1 serves two audiences at once. For the reader, it should be clear, specific and inviting: it should promise something worth reading. For the search engine, it should contain the keyword and describe the topic accurately. Those two aims usually agree. A heading that is clear to a human is usually clear to a machine as well.

Test your H1s by reading them aloud. If a stranger could guess the page's content from the heading alone, it is doing its job. If they could not, rewrite it until they can.

H1 Tag for SEO: A Simple Checklist

Before you publish any page, run through this checklist. Does the page have exactly one H1? Does it describe the topic clearly? Is it between roughly 20 and 70 characters? Does it include the main keyword naturally? Is it the most prominent heading on the page? If the answer to all five is yes, your H1 is doing its job. It is a small detail, but it is one of the most powerful on-page elements you control.

Zohaib FaisalZohaib Faisal is the founder and editor of EarnDesk. Based in Lahore, Pakistan, he runs the online store Haseeb Collections and works as a freelancer on Fiverr (virtual assistance, AI content writing, AI prompt engineering and digital marketing). He builds websites — Haseeb Collections, EarnDesk and a temporary-email service — writes SEO-focused content, and has hands-on AdSense experience across his sites. He has earned 15+ professional certificates from Google, IBM, Microsoft, HubSpot, Cisco, the Linux Foundation, Unity, Semrush and Harvard (CS50P), and creates the YouTube channel Clips by Zohaib. On EarnDesk he writes practical, honest guides to help beginners earn online — without hype or "get rich quick" promises. More about Zohaib.

Earning online takes time and consistent work. Results vary from person to person, and no method on this page guarantees any income. Treat every opportunity as a skill to build, not a shortcut.