Sub topic 5
Length and Truncation in Search Results
This chapter assumes you can write a basic HTML <head> with a <title> and a meta description, and that you know what a search engine results page (SERP) looks like. It also assumes you have already chosen a target keyword and drafted a title around it. Here you learn why a good title can still look broken in results, and how to set a length budget for it.
Why length matters at all
The <title> element has no length limit in HTML. A browser accepts a 300-character title. Search engines also read the whole title, so a long title can still help them work out what the page is about.
The limit applies to display. A results page gives each result one line for the title link. If the title does not fit on that line, the engine cuts it and adds an ellipsis (…). Readers see only the visible part, and that part decides whether they click.
Truncation causes three problems:
- Lost keywords. A keyword near the end of a long title may be cut off. The reader no longer sees the match with their query.
- Lost meaning. A cut such as "Snake Plant Repotting: Everything You Need to Know About…" leaves out the actual promise of the page.
- Lost brand or qualifier. A suffix such as a site name is usually the first thing to go. That is acceptable, but you should know it will happen.
Pixels, not characters
Google does not publish a character limit. It truncates by the rendered width of the title in pixels. Desktop results have historically allowed about 600 pixels for the title line, though this changes with layout updates and varies by device.
Characters have different widths, so a character count only approximates the limit. Compare these two strings, which have the same number of characters:
WWWWWWWWWWWWWWWWWWWW(20 capital W's) is wide and uses a lot of the line.iiiiiiiiiiiiiiiiiiii(20 lowercase i's) is narrow and uses very little.
Mixed-case English text averages roughly 50 to 60 characters across 600 pixels. Titles with many capitals, digits, or wide letters such as m and w fit fewer characters. Titles with many narrow letters such as i, l, t, and f, or with many spaces, fit more.
| Element | Typical visible range | Notes |
|---|---|---|
| Title link, desktop | About 50 to 60 characters (about 600 px) | Cut by pixel width. Capitals shorten it. |
| Title link, mobile | Similar, sometimes slightly more | Layout differs by device and can change. |
| Meta description, desktop | About 150 to 160 characters | May be replaced by text from the page. |
| Meta description, mobile | About 120 characters | Often shorter than desktop. |
Treat these numbers as planning ranges, not rules. Check them against the current results for your own pages.
How a title reaches the results page
The diagram shows what happens to a title between your HTML and the reader's screen.
Two points follow from this. Indexing and display are separate steps, so the hidden tail of a title can still count for ranking. The visible part is what the reader judges. The replacement branch is covered in the later chapter on search engines rewriting titles. Here, remember only that a title that is too long, too vague, or stuffed is more likely to be replaced.
Setting a length budget
Set a target range instead of a single maximum. A workable range for English titles is about 30 to 60 characters.
- Under 30 characters. The title is often too thin. It may waste space that could state the page type or a useful qualifier.
- 30 to 60 characters. The title usually displays in full and has room for the keyword and a modifier.
- Over 60 characters. The title may be truncated, depending on the letters used.
Put the important words first
Because truncation removes the end of the title, write the title in order of importance:
- The target keyword, or a close form of it.
- A modifier that states the page type or benefit, such as "Step-by-Step Guide".
- The brand name, if you use one.
Compare the two titles below. Both contain the keyword, but only the first keeps it safe from truncation.
<!-- Keyword first, 46 characters, fits on one line -->
<title>How to Repot a Snake Plant: Step-by-Step Guide</title>
<!-- Keyword and meaning at risk, 101 characters, will be cut -->
<title>Snake Plant Repotting: Everything You Need to Know About Pots, Soil, Roots and Aftercare | Leaf & Pot</title>In the second title, the brand and most of the list will be cut. The visible text will end near "Know About", which tells the reader very little.
Handle the brand suffix deliberately
Many sites append a brand name after a separator, such as | Leaf & Pot. This costs about 10 to 15 characters. You have three options:
- Keep the brand on every page, and accept a shorter descriptive part.
- Keep the brand only on the home page and a few key pages, and use the full width elsewhere.
- Shorten the brand, for example to the domain name, if the long form takes too much space.
Whichever you choose, apply the rule consistently across the site, so that your audits can check it.
Checking lengths with a script
You can check a title by eye on a few pages. On a site with hundreds of pages, a script is better. The following Python script uses only the standard library. It reads the title from an HTML string, counts its characters, and shows a preview of where a 60-character budget would cut it.
from html.parser import HTMLParser
MIN_CHARS = 30
MAX_CHARS = 60
class TitleParser(HTMLParser):
"""Collect the text inside the first <title> element."""
def __init__(self):
super().__init__()
self.in_title = False
self.done = False
self.parts = []
def handle_starttag(self, tag, attrs):
if tag == "title" and not self.done:
self.in_title = True
def handle_endtag(self, tag):
if tag == "title" and self.in_title:
self.in_title = False
self.done = True
def handle_data(self, data):
if self.in_title:
self.parts.append(data)
@property
def title(self):
return " ".join("".join(self.parts).split())
def audit_title(html):
parser = TitleParser()
parser.feed(html)
title = parser.title
n = len(title)
if n == 0:
return "0 chars | MISSING | (no title found)"
if n > MAX_CHARS:
preview = title[:MAX_CHARS].rsplit(" ", 1)[0] + "…"
return f"{n} chars | TOO LONG | {preview}"
if n < MIN_CHARS:
return f"{n} chars | SHORT | {title}"
return f"{n} chars | OK | {title}"
pages = [
"<head><title>How to Repot a Snake Plant: Step-by-Step Guide</title></head>",
"<head><title>Snake Plant Repotting: Everything You Need to Know About "
"Pots, Soil, Roots and Aftercare | Leaf & Pot</title></head>",
"<head></head>",
]
for page in pages:
print(audit_title(page))Running it prints:
46 chars | OK | How to Repot a Snake Plant: Step-by-Step Guide
101 chars | TOO LONG | Snake Plant Repotting: Everything You Need to Know About…
0 chars | MISSING | (no title found)The parser converts & to & before counting, so the count matches what the browser and the search engine see. Counting the raw source would overstate the length.
This script measures characters, not pixels. It will flag some titles that fit and miss some that do not. Use it to find candidates for review, then check the borderline cases by looking at them in real results or in a SERP preview tool.
Edge cases
Capital letters and wide characters
A title in all capitals, such as HOW TO REPOT A SNAKE PLANT, is much wider than the same text in sentence case. It may be cut at 40 characters or fewer. Sentence case or title case is safer, and it is also easier to read.
Non-Latin scripts
Chinese, Japanese, and Korean characters are wide, and each takes roughly twice the space of a Latin letter. A title in these scripts often fits only about 30 characters. A character limit tuned for English will be wrong for them. Measure by pixel width, or by a limit set per language.
Emoji and special symbols
Symbols such as stars and arrows may be shown, replaced, or dropped. They also take width. Do not rely on them to fit your keyword in, and check how they render before using them.
Separators
A pipe (|), dash, or colon takes space and adds little meaning. Use one separator between the descriptive part and the brand, not several.
Titles that change by device
The same title can be cut at different points on desktop and mobile. When the cut point matters, put the keyword and the main idea in the first 40 characters or so. They will then survive on both.
A quick method for each page
- Write the title in order of importance: keyword, qualifier, brand.
- Count the characters, and aim for 30 to 60.
- Look for capitals, digits, and wide letters. If the title has many, aim near the lower end.
- Confirm the keyword and the main idea fall within the first 40 characters or so.
- Preview the title on desktop and mobile, then check the live result after the page is indexed.
If the live result shows a different title from the one you wrote, the engine has rewritten it. The next chapter looks at why that happens and what to do about it.
Exercise
A page has the title "Snake Plant Repotting: Everything You Need to Know About Pots, Soil, Roots and Aftercare | Leaf & Pot", which is 101 characters long. Rewrite it so that it is under 60 characters, keeps the keyword "repot a snake plant" at the start, and drops the brand. Then explain why the engine can still use the original long text even though readers see only part of it.
Show answer
One acceptable rewrite is "How to Repot a Snake Plant: Pots, Soil and Aftercare", which is 52 characters. The keyword is at the start, and the qualifier states what the page covers. The engine can still use the original text because indexing and display are separate steps. The engine reads the whole title in the HTML, and only the displayed link is cut by pixel width. The reader judges the page by the visible part, so the keyword and main idea must come first.
Exercise
Two titles each have exactly 55 characters. The first is written in sentence case. The second is written entirely in capital letters. Which one is more likely to be truncated, and why? What does this tell you about using a character count as your only check?
Show answer
The all-capitals title is more likely to be truncated. Search engines cut titles by rendered pixel width, and capital letters are wider than lowercase letters, so the same number of characters takes more of the title line. A character count is only an approximation of the real limit. It is useful for finding candidate titles to review, but borderline cases need a check against real or previewed results.