Keyword targeting fails most often not because the keyword is wrong, but because it's placed wrong. A primary keyword buried in paragraph four does almost nothing for rankings. A secondary keyword stuffed into an H1 crowds out the term that should be there. This guide walks you through a decision tree: for each keyword type (primary, secondary, semantic) and each page element (title tag, H1, subheads, body, image alt text, URL), you'll know exactly where it belongs and why.
This isn't a static diagram you've seen a dozen times on other SEO blogs. It's a working walkthrough built from real page audits, the kind where a page had all the right keywords but in all the wrong places, and a few structural moves turned it around.
Step 1: Separate your keywords into three tiers
Before you place anything, sort your keyword list. Most pages that underperform have one keyword tier (usually the primary) and nothing else, which leaves Google guessing at context.
- Primary keyword: the single phrase the page is built to rank for. One per page. Example: "commercial roof repair."
- Secondary keywords: close variants or related queries with real search volume. Example: "commercial roofing contractor," "flat roof repair cost."
- Semantic keywords: terms Google's natural-language models associate with the topic, even if they're not exact variants. Example: for "commercial roof repair," that's terms like "membrane," "ponding water," "warranty," "inspection."
If you only have a primary keyword and nothing else, stop here and build out the other two tiers first. Google's systems understand topics through language patterns, not just exact-match strings, so a page that only repeats one phrase looks thin to both the algorithm and the reader.
Step 2: Decide where the primary keyword goes (and where it doesn't)
The primary keyword has exactly four mandatory homes. Skip one, and you're leaving ranking signal on the table. Overuse it anywhere outside these four, and you risk looking like you're optimizing for a bot instead of a person.
- Title tag. As close to the front as natural phrasing allows. "Commercial Roof Repair in Tampa" beats "Tampa Services: Commercial Roof Repair."
- H1. Should closely mirror the title tag but doesn't need to match it exactly. One H1 per page, always.
- First paragraph. Within the first two sentences, ideally the first. This is also where you deliver the answer-first summary a reader (and an AI answer engine) is scanning for.
- One H2. Pick the section that most directly addresses the core topic, not a tangential one.
Where it does *not* need to go: every H2, every image alt tag, or the URL slug if the slug already reads cleanly without it. Repetition across all of these is what keyword stuffing actually looks like, and it reads as robotic to a human visitor too.
A before/after example
A client page targeting "emergency plumber Tampa" had the phrase in the H1, three more times in body copy, and nowhere else. No secondary terms, no semantic coverage, generic meta description. After restructuring: the primary stayed in the title tag, H1, and opening sentence; secondary terms ("24 hour plumbing Tampa," "burst pipe repair") moved into two H2s; semantic terms ("water damage," "shut-off valve," "licensed plumber") were woven through body paragraphs and one FAQ section. Organic visibility for the target term and five adjacent queries improved within the following reporting period. The lesson wasn't "add more keywords." It was "put the right keyword in the right slot."
Step 3: Place secondary keywords in your H2s and H3s
Secondary keywords are where most of your subheading real estate goes. Think of each H2 as answering a distinct sub-question your reader has, and let the secondary keyword name that sub-question naturally.
- If your primary keyword is "small business SEO services," a secondary keyword like "local SEO pricing" becomes an H2: "## How Much Does Local SEO Pricing Cost for Small Businesses?"
- Don't force a secondary term into a subhead if it bends the sentence into nonsense. A keyword that doesn't fit shouldn't be in that header; reorder your sections instead.
- Aim for one secondary keyword per H2, not every secondary keyword in every H2. Spread them across the page the same way you'd spread internal links: evenly, not front-loaded.
This structural approach is the same one we break down in more depth in our guide to optimizing every page on a site, including how header hierarchy itself becomes a relevance signal.
Step 4: Let semantic keywords live in the body, not the headers
Semantic terms are the ones that prove to Google (and to the reader) that you actually understand the topic, not just the target phrase. They almost never belong in headers. They belong in sentences, used the way a genuine expert would use them in conversation.
For a page about "Achilles tendon treatment," semantic terms might include "inflammation," "physical therapy," "orthotics," and "recovery timeline." None of these need their own H2. They show up naturally when you're explaining the condition, the causes, and the treatment options in plain language.
A quick gut-check: if a term only makes sense as a header and sounds stilted in a sentence, it's probably secondary, not semantic. If it slots naturally into a sentence but would look bizarre as a standalone header, it's semantic. That's your decision point.
Step 5: Don't forget the elements people skip
Keyword placement isn't just headers and paragraphs. These are the spots that get neglected most often, and they're easy wins:
- URL slug: include the primary keyword if the URL isn't already set in a CMS structure you can't easily change. Keep it short: /commercial-roof-repair, not /services/florida/tampa-bay/commercial-roof-repair-contractors.
- Image alt text: describe the image accurately first, and work in a keyword variant only if it fits honestly. "Technician inspecting flat roof membrane" is better than "commercial roof repair commercial roof repair."
- Meta description: not a ranking factor directly, but it drives click-through, which is a performance signal. Include the primary keyword and the location if relevant, and write it to earn the click.
- Internal anchor text: when you link to this page from elsewhere on your site, vary the anchor text using primary and secondary keyword variants rather than the exact same phrase every time.
Step 6: Check keyword density without obsessing over it
Density is a guardrail, not a target. A rough range of 0.5% to 3% keeps you safe: enough repetition that the topic is unmistakable, not so much that a human reader notices you're repeating yourself. For a 1,500-word page, that's roughly 7 to 45 mentions of the primary keyword and its close variants combined, not 7 to 45 mentions of the exact same string.
If you're building pages in a platform like Squarespace, the mechanics of where these fields actually live (meta fields, URL settings, alt text boxes) can be fiddly. We've mapped that out specifically in how to add and optimize keywords in Squarespace if that's your CMS.
Step 7: Run the decision tree on a live page
Here's the full sequence, start to finish, the next time you're optimizing a page:
- Confirm you have one primary keyword, three to five secondary keywords, and a working list of semantic terms.
- Place the primary keyword in the title tag, H1, first paragraph, and one H2.
- Distribute secondary keywords across your remaining H2s and H3s, one per header, only where it reads naturally.
- Weave semantic terms through body paragraphs in plain, conversational language.
- Fill in URL, alt text, meta description, and internal anchor text with variants, not repeats.
- Read the page out loud. If any sentence sounds like it was written for a crawler instead of a person, rewrite it.
That last step catches more problems than any density checker will. Google's own guidance on helpful, people-first content is explicit: content written primarily to manipulate rankings, rather than to help a reader, is what gets penalized. A page that passes the read-aloud test and still hits every slot in this decision tree is doing both jobs at once.
When to bring in outside help
This process works, but auditing it across a full site, dozens of pages, hundreds of headers, inconsistent legacy content, is where it gets time-consuming fast. If you want a full breakdown of what a professional on-page audit actually involves and what it costs, our guide on on-page SEO services: what's included, what they cost covers that in detail.
If you'd rather have a team run this keyword placement framework across your entire site, map out your primary, secondary, and semantic terms page by page, and fix the structural issues that are quietly capping your rankings, see how our on-site SEO services work and get a page-by-page plan built around your actual content, not a generic template.