Sub topic 10
Place keywords in the title, headings, URL, and body
This chapter assumes you already have one primary keyword and a short list of related keywords for a page, chosen in the earlier chapters. It also assumes you know the parts of a web page: the title, the headings, the URL, and the body text. The question here is where each keyword goes on the page, and how to word it so it still reads well.
What placement does and does not do
Search engines read a page's title, headings, URL, and body to work out what the page is about. Readers use the same signals to decide whether to click and keep reading. A keyword in the right place tells both audiences that the page answers the query.
Placement does not rescue a poor keyword choice. If the page does not match the search intent, or the results page is full of pages of a different type, no arrangement of words will fix that. Placement also has diminishing returns. The first few placements carry most of the value, and repeating the keyword more often adds little and makes the text worse.
Where each keyword type goes
The primary keyword goes in a few high-visibility spots. Related keywords go in the places where they fit the content, usually subheadings and body paragraphs.
| Location | Primary keyword | Related keywords | Notes |
|---|---|---|---|
| Title tag | Yes, near the start if it reads well | Rarely, and only one if it fits | Shown as the clickable headline in search results |
| Meta description | Yes, in natural wording | Optional | Not a direct ranking factor, but it affects whether people click |
| H1 | Yes | No | One H1 per page, matching the title's promise |
| H2 and H3 | Sometimes | Yes | Use the headings the content needs, not a keyword per heading |
| URL slug | Yes, short form | No | Hard to change once the page has links |
| First paragraph | Yes | Optional | Confirms the topic early |
| Body text | Yes, a few times | Yes, where relevant | Natural frequency, no target count |
| Image alt text | Only if the image shows it | Only if the image shows it | Describe the image first |
The title tag
The title tag is the single most important place for the primary keyword. It is the headline readers see in search results, so it has two jobs: contain the keyword and make someone want to click.
- Put the primary keyword, or a natural form of it, in the title. Placing it near the start helps readers scanning a list of results, but never distort the sentence to achieve that.
- Keep the title to roughly 50 to 60 characters. Search engines measure display width in pixels, so there is no exact limit, and longer titles may be cut off with an ellipsis. Put the important words first so a cut does not hide them.
- Make every title on the site unique.
- Add the site name at the end, separated by a pipe or dash, as in the example below.
A primary keyword like "choose primary keyword" does not have to appear word for word. "How to Choose a Primary Keyword for a Page" contains all three words and reads like a person wrote it. Search engines understand word variations, so a natural phrasing is better than a literal copy of the keyword string.
The meta description
The meta description is a short summary that search engines may show beneath the title. Search engines often rewrite it to match the query, and it is not a direct ranking factor. It still earns its place because a clear description increases the chance that someone clicks.
Use the primary keyword once, in a sentence that says what the reader will get. Aim for about 120 to 160 characters. Search engines bold matching words in the snippet, which makes the match easy to see.
The H1 and subheadings
The H1 is the visible main heading on the page. Keep one per page, and make it agree with the title tag. They do not have to be identical, but a reader who clicks a result about "choosing a primary keyword" should land under a heading that says the same thing.
Subheadings (H2 and H3) are where related keywords fit most naturally. Plan the headings from the content the reader needs. Then check whether your related keywords already describe some of those sections. If a related keyword names a real subtopic, use it as a heading. If it does not, leave it for the body text or drop it.
Do not add a heading just to hold a keyword. A heading that exists only for a keyword often repeats the section above it, and readers notice.
This example shows the primary keyword in the title, meta description, and H1, and related topics in the subheadings:
<head>
<title>How to Choose a Primary Keyword for a Page | Example Site</title>
<meta name="description" content="Learn to pick one primary keyword and a few related keywords for a page, based on search intent and the current search results.">
</head>
<body>
<h1>How to choose a primary keyword for a page</h1>
<h2>Check the search intent first</h2>
<h2>Pick related keywords and long-tail variants</h2>
</body>The meta description says "pick" where the title says "choose". That is deliberate. The two words mean the same thing, and varying them keeps the snippet from sounding like a copy of the title.
The URL
A URL slug is the readable last part of the address, such as choose-primary-keyword in /blog/choose-primary-keyword. Good slugs are short, lowercase, and use hyphens between words.
- Include the primary keyword in its short form. Drop filler words such as "a", "the", and "for".
- Do not include dates, version numbers, or other details that will go stale.
- Do not stuff several keywords into the slug.
- Pick the slug before you publish. Changing it later means setting up a permanent redirect (a 301) from the old address to the new one. Even then, any links pointing at the old address take a detour.
The body text
In the body, the main goal is to answer the query completely. Keyword placement comes second.
- Use the primary keyword, or a natural variant, in the first paragraph. This confirms the topic to readers and search engines.
- Use related keywords where they are the correct term for what you are explaining. A section on search intent will mention "search intent" without any planning.
- Use synonyms and rephrasings. A page about choosing a keyword can also say "pick", "select", and "target".
- Use descriptive anchor text for internal links. A link reading "keyword research tools" tells the reader what they will find. A link reading "click here" tells them nothing.
- Write image alt text that describes the image. Include a keyword only when it honestly describes what the image shows.
The next chapter covers how to write naturally and avoid stuffing, so this chapter does not give a frequency target. For now, if you read the page aloud and a sentence sounds like it was written for a robot, rewrite it.
How the parts fit together
The diagram shows how the two keyword types flow to the page elements.
Auditing placement with a script
A quick script can check a page for the basics. This one uses Python's standard library only. It looks at the title, meta description, H1, and URL path, and checks whether the related keywords show up in the H2 headings. It matches on words rather than exact phrases, so "choose primary keyword" matches "How to Choose a Primary Keyword for a Page".
import re
from html.parser import HTMLParser
class PlacementAudit(HTMLParser):
def __init__(self):
super().__init__()
self.current = None
self.title = ""
self.h1 = ""
self.h2 = []
self.description = ""
def handle_starttag(self, tag, attrs):
attrs = dict(attrs)
if tag == "meta" and attrs.get("name") == "description":
self.description = attrs.get("content", "")
if tag in ("title", "h1", "h2"):
self.current = tag
if tag == "h2":
self.h2.append("")
def handle_data(self, data):
if self.current == "title":
self.title += data
elif self.current == "h1":
self.h1 += data
elif self.current == "h2":
self.h2[-1] += data
def handle_endtag(self, tag):
if tag == self.current:
self.current = None
def words(text):
return set(re.findall(r"[a-z0-9]+", text.lower()))
def report(html, primary, related, path):
audit = PlacementAudit()
audit.feed(html)
needed = words(primary)
checks = {
"title": audit.title,
"meta description": audit.description,
"h1": audit.h1,
"url": path,
}
for name, text in checks.items():
status = "ok" if needed <= words(text) else "missing"
print(f"{name}: {status}")
heading_words = words(" ".join(audit.h2))
for phrase in related:
where = "in an H2" if words(phrase) <= heading_words else "not in an H2"
print(f"related '{phrase}': {where}")
page = """
<head>
<title>How to Choose a Primary Keyword for a Page | Example Site</title>
<meta name="description" content="Learn to pick one primary keyword and a few related keywords for a page, based on search intent and the current search results.">
</head>
<body>
<h1>How to choose a primary keyword for a page</h1>
<h2>Check the search intent first</h2>
<h2>Pick related keywords and long-tail variants</h2>
</body>
"""
report(
page,
primary="choose primary keyword",
related=["search intent", "long-tail keywords"],
path="/blog/choose-primary-keyword",
)Running it prints:
title: ok
meta description: missing
h1: ok
url: ok
related 'search intent': in an H2
related 'long-tail keywords': in an H2The "missing" for the meta description is a false alarm. The description uses "pick", a synonym for "choose", which the script cannot know. Treat the output as a prompt for a human decision, not a pass or fail grade.
Common errors
- Keyword in every heading. Repeating the primary keyword in each H2 reads as forced and adds nothing the title did not already say.
- Title and H1 that disagree. A title promising one thing and an H1 saying another confuses readers and weakens both.
- Ignoring the first paragraph. A page that takes four paragraphs to name its topic gives readers and search engines a weak early signal.
- Long, stuffed URLs. Slugs with five or six keywords look spammy and are hard to read.
- Changing the URL after publishing. Without a redirect, links and any earned ranking signals are lost.
- Placing a keyword the page does not cover. If the content does not answer the query, the title only creates a mismatch, and readers leave quickly.
- Duplicate titles across pages. Two pages with the same title compete and blur each other's topic. Check the keyword map from the earlier chapters before you write the title.
Exercise
Exercise
A page targets the primary keyword "keyword research tools". Its title is "Our Favorite Tools", its H1 is "Keyword Research Tools Compared", and its URL is /blog/2026-11-27-the-best-free-and-paid-keyword-research-tools-for-seo-beginners. Name three placement problems and a fix for each.
Show answer
First, the title lacks the primary keyword and is too vague to attract clicks. Rewrite it as something like "Keyword Research Tools Compared: Free and Paid Options | Example Site". Second, the title and H1 do not agree, so the title should now match the H1's promise as the rewrite above does. Third, the URL is long, contains a date that will go stale, and stuffs extra words. Shorten it to /blog/keyword-research-tools before publishing. If the page is already live, add a 301 redirect from the old address to the new one.
Exercise
Your audit script reports "missing" for the meta description of a page whose description says "select" where the primary keyword says "choose". What should you do, and why?
Show answer
Read the description and decide for yourself. "Select" and "choose" are synonyms, so the description is probably fine. The script matches words, not meaning, so it flags synonyms as missing. Change the wording only if the description is unclear or does not tell the reader what they will get.