Sub topic 11
When Search Engines Rewrite Your Title
This chapter assumes you can write a title tag and an h1 for a target keyword, as covered in earlier chapters. You should also know what a search results page looks like. Here you will learn why the title a searcher sees sometimes differs from the one you wrote. You will also learn how to reduce unwanted rewrites and how to tell whether a rewrite is a problem.
What a rewrite is
The <title> element is a request, not an instruction. A search engine reads it, compares it with the rest of the page and the query, and decides what to show as the clickable blue link. Google calls this link the "title link". If it judges your title to be a poor description, it builds a different one.
A rewrite can take several forms:
- The engine swaps in your h1 or another heading.
- It shortens your title and drops the brand name.
- It removes repeated words or separators.
- It combines text from several places on the page.
- It shows different text for different queries.
The last form matters most for how you test. You may see your original title for one query and a modified one for another, for the same URL.
Where the replacement text comes from
Google documents the sources it uses for title links. They include:
- the
<title>element - the main visible title on the page, which is usually the h1
- other headings and large, prominent header-style text
og:titleand similar metadata- anchor text of links on the page
- text in links from other pages that point to this one
Google has said that most of the time it shows the title element as written. Rewrites are the exception, but they are common enough to plan for.
Why titles get rewritten
Rewrites follow patterns. Each cause below has a fix that you control.
| Cause | What the engine sees | Typical fix |
|---|---|---|
| Keyword stuffing | The same phrase repeated with separators | Write one natural phrase |
| Title too long | More text than fits in the result | Put the keyword and the main idea first |
| Boilerplate | The same title on many pages, such as "Home" or "Untitled" | Give every page a unique title |
| Missing or empty title | Nothing to show | Add a descriptive `<title>` |
| Title and h1 disagree | Two different descriptions of the page | Align them around the same topic |
| Outdated or wrong title | The title names a year, offer or product the page no longer covers | Update the title when the content changes |
| Title does not match the query | The page covers the topic but the title frames it differently | Add the searcher's wording to the title or a heading |
| Brand-heavy title | The brand takes up most of the title | Shorten the brand part to a suffix |
The "does not match the query" cause is the one you cannot fully remove. A page that ranks for several queries will show several titles if the engine thinks another version suits a given query better.
Display limits and truncation
Truncation is related to rewriting but is different. When the title is too wide for the result, the engine cuts it and adds an ellipsis. The page's title is unchanged, and only the display is shortened.
Search engines measure width in pixels, not characters. Wide letters such as "W" and "M" use more space than "i" or "l". A common guide is about 600 pixels on desktop, which is roughly 50 to 60 characters of mixed text. Treat this as an approximation. Google does not publish a character limit, and the width available can change.
Practical rules:
- Put the target keyword and the main idea in the first 50 characters.
- Put the brand name at the end, after a separator.
- Do not rely on the end of a long title to carry meaning.
- Long titles are not penalised as such, but the engine may rewrite or cut them.
Compare these two titles for the same page:
<!-- Long: the useful part may be cut off, and the engine may replace it -->
<title>Our Complete, Updated and Detailed Guide to Everything About How to Repot a Snake Plant | Leafy Home Garden Supplies</title>
<!-- Front-loaded: the keyword survives truncation -->
<title>How to Repot a Snake Plant: Step-by-Step Guide | Leafy Home</title>If the second title is cut at the brand name, the searcher still sees the full description.
Aligning the title and the h1
When the title and the h1 describe different things, the engine has to choose between them. This conflict is the most common reason for an h1 to replace a title.
The two do not have to be identical. The title can be a little longer and can carry the brand. The h1 can be shorter and read more directly. What matters is that both name the same topic and the same primary keyword.
<!-- Conflict: the title promises a how-to, the h1 names a category -->
<title>How to Repot a Snake Plant: Step-by-Step Guide</title>
<h1>Houseplant Care</h1>
<!-- Aligned: same topic, different wording and length -->
<title>How to Repot a Snake Plant: Step-by-Step Guide | Leafy Home</title>
<h1>How to Repot a Snake Plant</h1>In the conflicting version, the engine may show "Houseplant Care", which no longer matches the searcher's intent. The aligned version gives it no reason to substitute.
Checking for rewrites
You cannot see a rewrite by looking at your source code. You have to look at the results page, or at the data the search engine gives you.
- Search for the exact URL's topic using the queries you target. A
site:example.com/your-pagesearch is a quick way to see one URL's display title. - Repeat with two or three different queries, since the title can change per query.
- Compare what you see with your
<title>and h1. - Note whether the difference is a truncation, a trimmed brand, or a full replacement.
- Check Search Console performance data by page and query. A page whose click-through rate drops after a rewrite is worth reviewing.
Results can be personalised and can vary by location and device, so confirm a pattern across several checks before changing anything.
A quick audit script
A script can find the causes listed above before they show up in search results. It cannot predict an engine's decision. This one reads a page's title and first h1 with Python's standard library and flags common risks.
from html.parser import HTMLParser
class TitleH1Parser(HTMLParser):
def __init__(self):
super().__init__()
self.current = None
self.title = ""
self.h1s = []
def handle_starttag(self, tag, attrs):
if tag == "title":
self.current = "title"
elif tag == "h1":
self.current = "h1"
self.h1s.append("")
def handle_endtag(self, tag):
if tag in ("title", "h1"):
self.current = None
def handle_data(self, data):
if self.current == "title":
self.title += data
elif self.current == "h1":
self.h1s[-1] += data
def audit(html, keyword):
parser = TitleH1Parser()
parser.feed(html)
title = " ".join(parser.title.split())
h1 = " ".join(parser.h1s[0].split()) if parser.h1s else ""
key = keyword.lower()
issues = []
if not title:
issues.append("title is missing or empty")
else:
if len(title) > 60:
issues.append(f"title is {len(title)} characters, over the 60 character guide")
count = title.lower().count(key)
if count == 0:
issues.append(f'keyword "{keyword}" is not in the title')
elif count > 1:
issues.append(f'keyword "{keyword}" appears {count} times in the title')
if not h1:
issues.append("h1 is missing")
elif title:
shared = set(title.lower().split()) & set(h1.lower().split())
if not shared:
issues.append("title and h1 share no words")
return issues
weak = """<title>Snake plant | snake plant repotting | repot snake plant | best snake plant</title>
<h1>Snake Plant</h1>"""
good = """<title>How to Repot a Snake Plant: Step-by-Step Guide</title>
<h1>How to Repot a Snake Plant</h1>"""
for name, page in (("Weak page", weak), ("Good page", good)):
print(name + ":")
for issue in audit(page, "snake plant") or ["OK"]:
print("-", issue)Running it prints:
Weak page:
- title is 74 characters, over the 60 character guide
- keyword "snake plant" appears 4 times in the title
Good page:
- OKThe 60-character limit in the script is a rule of thumb that stands in for the pixel width. A title of 62 narrow characters might display in full, and one of 55 wide characters might not.
Reducing unwanted rewrites
Most of the work happens before the page is published.
- Write a title that describes the page in plain language, with the keyword once.
- Keep the title unique across the site.
- Keep the title and h1 about the same topic.
- Avoid separator chains and repeated brand names.
- Front-load the important words.
- Update the title when the page content changes.
- Make sure the title is in the HTML the crawler receives. A title injected late by JavaScript may be missed or replaced.
You cannot force a particular title. There is no tag that says "never rewrite this". Metadata such as og:title is one more source the engine may read, not a way to override its choice.
When a rewrite is acceptable
Not every rewrite needs fixing. Judge it by outcome.
- The replacement is accurate and the click-through rate is stable or better. Leave it.
- Only the brand name was dropped or shortened. Leave it.
- The replacement misdescribes the page, or it exposes a problem such as a missing h1. Fix the source.
- The replacement comes from anchor text that other sites use to link to you, and it is misleading. Fix the page so it states its topic more clearly. You cannot edit other sites' links.
Changing a title that already works, only to match what you saw once, can reduce performance. Make one change at a time, wait for the page to be recrawled, and compare results over a period long enough to cover normal variation in traffic. This is slow, and it is the only reliable method.
Common mistakes
- Testing with one query and assuming the title is rewritten for all of them.
- Counting characters and ignoring pixel width.
- Fixing the title and leaving a conflicting h1.
- Keeping a year or price in the title after the page changes.
- Using the same title template on thousands of pages with only a tiny variable part.
Exercise
A search for "repot snake plant" shows your page as "Houseplant Care | Leafy Home", but your title element reads "How to Repot a Snake Plant: Step-by-Step Guide". The page's h1 is "Houseplant Care". What is the most likely cause, and what should you change?
Show answer
The title and h1 describe different topics, so the engine chose the h1. Change the h1 to something like "How to Repot a Snake Plant" so both name the same topic and keyword. Then wait for a recrawl and search again with several queries.
Exercise
A title is 48 characters long and still ends in an ellipsis in search results. Give a likely reason and a fix.
Show answer
Width is measured in pixels, not characters, so a title with many wide letters (such as capital W and M) can exceed the available width even at 48 characters. Shorten it, remove wide words or the brand name, and put the keyword near the start so it survives any cut.
Exercise
You find that the engine shows a rewritten title for only one of your three target queries, and the rewrite is accurate. What should you do?
Show answer
Usually nothing. Per-query rewrites are normal. Check the click-through rate for that query in Search Console and act only if it falls or if the replacement misdescribes the page.