- Keep one h1 per page and nest h2 and h3 without skipping levels, so any parser can rebuild the outline.
- Write headings as the question a reader would ask, so each section has a clear topic and a clear ending.
- Treat heading changes as a hypothesis and check them against bot fetch logs, because no retrieval system publishes its exact rules.
Heading structure affects AI retrieval and extraction mainly by marking where a passage starts, where it ends, and what it is about. Many retrieval pipelines split pages into smaller units, and headings are one of the few explicit signals in the markup that suggest where those units should break. A clean outline gives a system useful boundaries. A messy one forces it to guess. This article explains what can reasonably be said about that, what cannot be known from outside, and how to check the effect on your own pages.
We build a product, InstantIndexingPro, that submits URLs through IndexNow and logs which bots actually fetch each URL. That log is the closest thing we have to ground truth for questions like this one, and it is the reason the measurement section gets so much space. Most of what follows is general practice rather than a finding from our data, and we will try to keep that distinction visible.
Why headings matter to retrieval
Headings matter to retrieval because they are one of the few places where a page states its own structure in plain markup. A person skimming a page uses headings to find the part they need. A system that breaks a page into pieces can use the same cues, though it does so with less context and fewer ways to recover from a bad guess.
Explicit does not mean reliable, though. A heading tag is a suggestion about structure, and plenty of sites use heading tags for visual effect while the real outline lives in CSS. Some pipelines render the page and read the visible text. Others parse the raw markup, and they may weigh the two differently. We cannot see most of these systems, so anything we say about how they treat headings is an inference from how such pipelines are commonly built, not a description of any specific product.
What can be said with reasonable confidence is this. A passage that opens with a clear heading, stays on one topic, and ends before the next heading is easier to lift out of a page than a passage that wanders across three subjects under one vague label. That holds for a human reader, and it is plausibly true for a machine that segments text before it judges relevance.
One h1, and what it is for
Each page should have one h1. It names the page, and everything else sits beneath it in the outline. When a page has several h1 tags, the outline has several roots, and a parser has to decide which one describes the whole document. Sometimes it will decide wrongly, and the wrong decision affects every section below it.
The h1 does not need to be clever. It should match the topic a reader or an assistant would name when asking about the page. If the page covers heading structure for retrieval, the h1 should say so plainly, not offer a slogan like 'Our approach to content' that tells the reader nothing about the subject. The title tag and the h1 can differ slightly in wording, but they should agree on what the page is about.
A common mistake is to use the h1 as a logo or a site banner. Some themes do this automatically. If the site template places a site name in an h1 on every page, the article's own title may end up as an h2, and the outline starts with a label that is the same on every URL. Check the rendered page, not only the content editor, because the theme often adds markup you did not write.
Nesting without skipping levels
Below the h1, use h2 for main sections and h3 for subsections inside them. Avoid jumping from h2 straight to h4, or from h1 to h3. Skipped levels do not break a page in any browser, so the problem is easy to miss. The outline simply becomes harder to rebuild, and any parser that relies on levels to decide what belongs under what has to infer the missing structure.
A minimal example of the hierarchy looks like this:
<h1>Heading structure for AI retrieval</h1>
<h2>Why do headings matter to retrieval?</h2>
<p>Headings mark where a passage starts and ends.</p>
<h3>Do headings have to be exact?</h3>
<p>Explicit markup is a suggestion, not a guarantee.</p>
<h2>What should the h1 say?</h2>
<p>It should name the page topic plainly.</p>
Read the example as an outline. The h1 is the root. The two h2 headings are its children. The h3 belongs to the first h2 because it sits between that h2 and the next one. A parser that walks the tags in order reaches the same tree, and that is the point of the exercise.
Nesting is about meaning, so do not choose heading levels for their default font size. If a line looks like a small title but is really a sub-point of the section above, make it an h3 and restyle it with CSS. If a heading names a main section, keep it at h2 even when you want it visually quieter than the rest of the page.
Phrasing headings as the question people ask
A question-shaped heading gives a passage a built-in boundary. The heading states what the section will answer, and the first sentence under it should answer that question. When the heading and the opening sentence agree, any system that extracts the opening lines gets a self-contained unit with a clear topic.
This does not mean every heading must end with a question mark. It means the heading should name the thing a real reader is trying to find out. 'How heading levels affect extraction' is a reasonable heading. 'Our vision' is not, because nobody searches for it and nothing in the section is named by it.
Question phrasing works best when the question is one people actually ask. Search queries, support tickets, sales calls and the questions customers put to assistants are all good sources. Write the heading in the reader's words, then answer it in the first two or three sentences underneath. If you find that you cannot answer the heading quickly, the section may be trying to cover too much.
We would not claim that question headings raise citation rates. We do not have a controlled comparison that isolates heading phrasing, and we are not aware of a published study that does. What we can say is that question headings make a section's topic easy to state, and that makes the section easier to judge as relevant, both for a reader scanning results and for a system deciding which span of text to use.
Headings for structure, not styling
Some sites use h2 or h3 because the browser makes them large and bold, not because the text is a section title. A button label, a pull quote, a cookie notice or a sidebar widget can all end up inside a heading tag. Each of these adds a false boundary to the outline, and a parser may treat the boundary as real.
The fix is simple. Use heading tags only for titles of real sections, and use CSS for everything else. If a pull quote needs to look like a heading, give it a class with the right font size and leave the tag as a paragraph or a blockquote. A parser that reads tags then sees the actual structure rather than the visual one.
The same rule applies to navigation and footers. A block that repeats on every page, such as 'Latest posts' in a sidebar, adds a boundary that has nothing to do with the article. Where possible, keep those blocks outside the main content container, or at least keep them from using heading tags that compete with the article outline. Your site's accessibility audit may already flag some of these cases, which is a useful shortcut.
Descriptive beats clever
Clever headings are pleasant to write and hard to use. 'The missing link' or 'Signals in the noise' may sound good to an editor, but they name nothing. A retrieval system matching a query against passages has little to hold onto, and a skimming reader learns nothing from the label.
Descriptive headings name the subject. 'Skipped heading levels and outline parsing' says what the section covers before the reader starts. It is less memorable, but a section with a descriptive heading is easier to find, quote and check against a question.
Descriptive does not mean stuffed. A heading packed with three keyword variants reads as spam to a person and gives a parser a muddy topic. Aim for the plain name of the thing, with one qualifier if the page covers several cases of it.
How clear boundaries help passage extraction
Clear headings help extraction because they mark where a chunk should begin and end. Extraction tends to work in one of two broad ways, and clear boundaries help both. In the first, the system splits a page into chunks, often at headings, and represents each chunk as a unit. A chunk that begins at a heading and stops before the next one has a natural topic. In the second, the system selects a span of text around the sentence that best matches a query. When the surrounding headings are clear, the span can be trimmed to the section that matches, rather than running into an unrelated block.
Boundaries also limit a common failure. When a long section has no subheadings, a fixed-length chunker may cut it at arbitrary points. The cut can land mid-argument, so the first half of a chunk answers one question and the second half answers another. Subheadings at the right points reduce that risk, though they do not remove it, because chunkers differ and some ignore headings entirely and split only on length.
Keep sections focused. A section that answers one question in its first two paragraphs and then drifts into a second question has a fuzzy boundary. If the drift is useful, give it its own heading. If it is not, cut it. Either choice gives a cleaner passage than leaving two topics under one label.
Section length and where to cut
Length matters less than focus, but very long sections are where boundaries blur. A section of two thousand words under one h2 has one heading and several topics. A chunker that uses headings gets one large unit, and a reader gets one large block. Breaking the section with h3 headings at the points where the subject changes gives each piece a label and an edge.
Very short sections have the opposite problem. A heading followed by a single sentence may be too thin to carry a passage on its own. No rule says every section needs a minimum length, but if a section cannot answer its own question in a short paragraph or two, it may belong under a broader heading as a subpoint.
A useful test is to read only the headings. If the list reads like a coherent outline of the page, the structure is probably sound. If the headings repeat each other, jump from broad to narrow with no middle level, or read like labels on a menu, rework them before touching the prose. Many outline problems are visible at this level and nowhere else.
Headings, lists and tables
A list or table works best when a heading names it directly. A list beneath a heading that states its subject gets a clear context. A table with a heading that says what it compares does the same job. A table with no heading, or with a generic heading such as 'Details', leaves the reader and the parser to infer what it is about, and inference is where errors creep in.
Keep the heading close to the content it names. If a section starts with a long introduction, then a table, then a list, the table and the list may each need an h3 with a specific name. Do not use headings to decorate a list that has no real subject, and do not turn a sentence into a list just to create visual structure. A list should hold items that are parallel. A short answer is often better as a sentence.
A before and after outline
Consider a hypothetical page about heading structure, written the way many pages are written. The h1 is 'Our thoughts on content'. Under it sit three h2 headings: 'The power of structure', 'Going deeper' and 'Final words'. A product callout uses an h4 because it looked right in the design. The body text under each heading covers several subjects, and the first sentence of the first section is a slogan.
A stronger version keeps the same subject and moves the boundaries to where a reader would look for them. The h1 becomes 'Heading structure for AI retrieval'. The h2 headings become 'How do heading levels affect extraction?', 'What should the h1 say?' and 'Where should sections end?'. The product callout becomes a paragraph, and its styling moves to a CSS class. Each section's first sentence answers the question its heading asks.
Nothing about the underlying content has to be new to get this improvement. The facts were already there. The change is in where the boundaries sit and what each boundary says. That is the kind of change worth measuring, because it is cheap to make and easy to reverse if the logs show no difference.
What cannot be known
Several things about this topic cannot be known from outside, and they should be stated plainly. Retrieval systems differ in how they segment pages, how they weigh headings against body text, and whether they read rendered text or raw markup. Those choices change over time, and most providers do not publish them in detail. A structure that suits one system may do nothing for another, and a system may change its behavior without notice.
We also cannot separate the effect of headings from the effect of everything that tends to come with good headings. A page with a clear outline is often also a page with a direct answer, a visible date, and fewer distractions. If that page is cited more often, the headings may be the cause, a marker of other quality, or both. Controlled tests on live search or assistant systems are hard to run, and results from one system rarely transfer cleanly to another.
Finally, citation itself is not under anyone's control. A well-structured passage may be retrieved and still not be quoted, and an answer may draw on a page without naming it. We do not promise citations, and nothing in this article should be read as a guarantee that a heading change will produce one. The honest claim is narrower: clearer boundaries make a passage easier for a system to isolate and judge, and whether that leads to visible results depends on factors outside the page.
Measuring the effect
Measure heading changes with a before and after comparison, not with a single check. Start with a fixed list of URLs, record the current headings for each, and note which bots fetch them and how often over a set period. If you can, change a subset of pages and leave a comparison group untouched. Then compare fetch patterns over the same window, so that seasonal swings do not look like results.
Bot fetch logs show whether crawlers reach a page and how often they return. They do not show whether a page was used in an answer. For that, run a fixed set of queries against the assistants and search tools your audience uses, record which sources appear, and repeat the check at the same interval. Results will be noisy, and a single run means little. Keep the query list stable, and write down the date and the tool version when you run it.
Our product, InstantIndexingPro, covers the first half of that process. It submits URLs through IndexNow and logs which bots actually fetch each URL, so you can see whether a structural change moves crawler behavior at all. It does not measure answer quality, and it cannot tell you why a bot fetched a page or whether a fetch led to anything.
Write down what you expect before you change anything. If you expect more fetches from a specific crawler after fixing skipped levels, say so, and then check it. If nothing moves, that is also a result. Many heading changes will produce no measurable difference, and it is better to learn that from a dated log than to assume a benefit that the data does not show.
What to do
Start with the pages that matter most, not the whole site. Check each one for a single h1 that names the topic. Walk the outline and fix any skipped levels. Rewrite vague section titles as the questions your readers ask, and make sure the first sentence under each heading answers that question. Move styling out of heading tags and into CSS. Remove site-wide blocks from the main content where you can, and check the rendered page, since themes often add headings you never wrote.
Then measure. Log the bot fetches for the changed pages and for a comparison set, keep the dates, and re-check the logs after a few weeks. If the pattern holds, roll the change out to more pages. If it does not, keep the structural fixes anyway, because they help readers, and stop describing them as a retrieval benefit you have not observed.