On-Page Optimization
On-page optimization is everything you do directly on your own pages to make them easier for search engines and AI systems to parse: the words you write, your titles and headings, how pages link to each other, and the technical plumbing underneath. It sits opposite off-page optimization, which happens on other people's sites and platforms. On-page is the part you fully control, which is also why it's the part you have no excuse to get wrong.
Why on-page optimization matters
Neither a search engine nor an AI model can rank or cite what it can't parse. On-page work is how you make a page's subject, audience, and answer unambiguous to a machine reading it cold. A page with a clear H1, a heading hierarchy that mirrors its argument, and unambiguous titles gets classified correctly more often — for search that affects your ranking, for AI answers it affects whether your content is retrievable as a source at all. It's worth being precise about what on-page work isn't, though: Google's own guidance for AI Overviews and AI Mode states there's no special markup, schema, or AI-specific file that improves your odds, and explicitly warns against writing content "for AI" instead of for the person reading it. On-page optimization done well is still just clear writing and clean structure — it doesn't need a separate playbook to be picked up by AI systems.
How on-page optimization works
You're working on three layers at once. The content layer is the actual writing: does the page answer the question someone (or some model) came with, completely and without padding. The structure layer is heading hierarchy — one H1, H2s and H3s that follow the logic of the page rather than the logic of a keyword list — plus internal links connecting the page to related ones. The technical layer covers load time, mobile rendering, and titles and meta descriptions that describe the page accurately rather than stuffing in variations of a keyword. Structured data (Schema.org markup for FAQs, how-tos, articles) can help a machine extract facts like prices or steps directly, but treat it as a readability aid, not a ranking lever: Google states plainly that no special schema is required for AI Overviews or AI Mode, and it isn't a proven independent citation factor either. The layers depend on each other — strong writing without structure gets skimmed and lost, and structure around thin content just organizes nothing.
Common mistakes
The oldest mistake is writing for the algorithm instead of the reader — forcing in keyword variations until the text reads like it was assembled rather than written. Modern systems, both search and AI, are good at spotting this and discount it. Almost as common is keyword cannibalization: several pages on the site competing for the same query, so none of them is ever treated as the clear answer. Missing or duplicated page titles, blank meta descriptions, and a heading structure that jumps around rather than nesting cleanly all make it harder for either a crawler or a model to tell what the page is actually about. Neglecting the technical basics — slow loads, a layout that breaks on a phone — undercuts even genuinely good content underneath it. And a newer mistake worth naming directly: publishing an llms.txt file expecting it to move the needle. John Mueller confirmed in 2025 that no Google Search system reads or acts on llms.txt, and an Ahrefs analysis of roughly 137,000 sites that published one found about 97% saw zero measurable referral traffic tied to it. If you're going to spend effort, spend it on the page itself.
Relation to AI visibility
On-page work matters more, not less, now that a meaningful share of searches end without a click. Ahrefs found AI Overviews correlate with a 58% lower average click-through rate for the #1 organic result, and SparkToro/Similarweb put the zero-click share of US Google searches at over 68% as of early 2026. When a model like ChatGPT or Gemini is the one reading your page instead of a person clicking through, what it extracts depends on the same fundamentals: a section that answers one question fully, in plain language, without requiring the reader to piece it together across paragraphs, is what a model can lift cleanly into an answer. That said, being well-optimized for classic search doesn't guarantee AI citation — Ahrefs research found only 6-8% of URLs cited by ChatGPT overlap with Google's top-10 for the same query, and roughly 80% of ChatGPT-cited pages don't rank in Google's top 100 at all. On-page fundamentals are necessary groundwork for both, but treat them as a separate audience with separate evidence, not one you can infer from the other.
Example
Picture a small electrical firm that installs heat pumps. Its site used to have one page, titled "Home," carrying a single unbroken block of text about the business. After on-page optimization, there's a dedicated page titled "Heat pump installation in Freiburg," with one clear H1, subheadings covering the process, costs, and available subsidies, and a short FAQ section at the bottom. Pricing and contact details are marked up as structured data so they're easy to extract. The page now ranks for the searches it's actually answering, and if someone asks an AI assistant what a heat pump installation costs in Freiburg, the page is a plausible source to be pulled from — not guaranteed, but plausible in a way the old single page never was.
Common questions
What's the difference between on-page and off-page optimization?
On-page optimization happens directly on your own website: content, structure, titles, technical setup. Off-page optimization happens everywhere else — backlinks, mentions, reviews, anything other sites or platforms say about you. You control on-page directly; off-page you can only influence.
Do I need special markup or an llms.txt file for AI search to pick up my page?
No. Google's own guidance says no special markup, schema, or AI-specific file is required for AI Overviews or AI Mode, and explicitly advises against writing separate content "for AI." An llms.txt file in particular does nothing for Google — John Mueller confirmed no Google system reads it, and an Ahrefs study of roughly 137,000 sites that published one found about 97% saw no measurable referral traffic from it. Clear, well-structured writing is still the actual lever.