SEO title truncation is measured in pixels, not characters: an HTTP-only audit
I built the Actor used in this post (mr.wolf/seo-audit-mcp-server). Numbers come from a run on 28 November 2026. The usual SEO rule is "keep titles under 60 characters". Google does not count characters. It truncates a
I built the Actor used in this post (mr.wolf/seo-audit-mcp-server). Numbers come from a run on 28 November 2026.
The usual SEO rule is "keep titles under 60 characters". Google does not count characters. It truncates a title when it no longer fits a fixed pixel width, so a title of 50 capital letters can be cut while a title of 70 narrow letters is not. A character counter gets both cases wrong.
I wanted a check that fits in a CI step or an AI agent's tool call, without a headless browser. The Actor fetches the HTML over plain HTTP, parses it with cheerio and returns one JSON object per page. This post shows what it measures, what it returned for four real pages, and where its numbers are only estimates.
How the pixel width is computed
The Actor holds a table of Roboto-Regular glyph advance widths for ASCII characters (1000 units per em). It sums the widths of the characters and scales by font size: 20 pt for the title, 14 pt for the meta description. This is the function in src/domain/seo-analyzer.ts, and I called it directly on three titles:
chars px title
54 618 BEST WELDING MACHINES AND WORKSHOP SOFTWARE 2026 GUIDE
54 516 Best welding machines and workshop software 2026 guide
69 483 Illuminating illicit trillion-dollar mill filling little jelly lilies
Same text, same length, 102 px apart because of capitals. The first one is over the 580 px limit the Actor uses for titles. The third has 69 characters and only 483 px, because it is full of i and l.
The audit flags TITLE_TOO_LONG when the width is over 580 px or the length is over 65 characters. So the narrow 69-character title is still flagged. That is a deliberate conservative rule, and it means a flag is a warning to check, not proof of truncation. The meta description uses 985 px or 165 characters.
What else it checks
Everything below comes from the code, nothing more:
- Title and meta description: presence, length, pixel width.
-
canonical,meta robotsand theX-Robots-Tagheader (it reportsNOINDEX_DIRECTIVEas info),html lang, count ofhreflanglinks. -
h1count (missing is critical, more than one is a warning) andh2count. - Visible word count, a Flesch reading score, and a soft-404 check (HTTP 200 with "page not found" style text in the title or
h1and fewer than 250 words). - Images without
alt, internal and external link counts, OpenGraph tags. - JSON-LD: it parses every
application/ld+jsonblock and returns the top-level@typestrings. It does not validate the schema against Google's rich result requirements. It tells you which types are present, and skips malformed blocks silently. - Security headers: presence of HSTS, CSP,
X-Frame-Options,X-Content-Type-Options. Only a missing HSTS becomes an issue. -
robots.txtpresence and the URL count of the first sitemap.
Each issue subtracts from a score that starts at 100. The weights are mine and arbitrary: a missing h1 costs 10, a missing meta description 10, a soft 404 costs 20. Use the score to sort pages, not as a Google metric.
Running it on four real pages
Input:
{
"urls": [
"https://apify.com",
"https://www.bbc.com/news",
"https://news.ycombinator.com",
"https://en.wikipedia.org/wiki/Search_engine_optimization"
],
"includeCrawlability": true
}
I ran it locally and got 4 items back. Trimmed output for the BBC page:
{
"url": "https://www.bbc.com/news",
"statusCode": 200,
"seoScore": 84,
"titleLength": 93,
"titlePixelWidth": 832,
"metaDescriptionLength": 249,
"metaDescriptionPixelWidth": 1538,
"hreflangCount": 2,
"h1Count": 1,
"h2Count": 51,
"imagesTotal": 44,
"imagesMissingAlt": 22,
"jsonLdTypes": ["WebPage"],
"securityHeaders": { "hsts": true, "csp": false, "xFrameOptions": true, "xContentTypeOptions": true },
"robotsTxtFound": true,
"sitemapUrlsCount": 100,
"issues": [
{ "code": "TITLE_TOO_LONG", "severity": "warning", "message": "Title may truncate in Google SERP (93 chars, 832px > 580px)." },
{ "code": "META_DESC_TOO_LONG", "severity": "warning", "message": "Meta description may truncate (249 chars, 1538px)." },
{ "code": "IMAGES_MISSING_ALT", "severity": "warning", "message": "22 of 44 images are missing alt attributes." }
]
}
Summary of the four pages:
| Page | Score | Title px | JSON-LD types | Issues |
|---|---|---|---|---|
| apify.com | 100 | 405 | Organization, WebSite, SoftwareApplication | none |
| bbc.com/news | 84 | 832 | WebPage | long title, long description, 22 of 44 images without alt |
| news.ycombinator.com | 66 | 116 | none | short title, no meta description, no canonical, no h1, 2 of 2 images without alt |
| Wikipedia, SEO article | 82 | 343 | Article | no meta description, 7 of 15 images without alt |
How I read it:
-
BBC. The title is 93 characters and 832 px, so Google will cut it. For a homepage with enormous brand strength that may be a choice. The 22 images without
altare worth a look, though some may be decorative images where an emptyaltis correct. The Actor counts emptyaltas missing, so it over-reports in that case. -
Hacker News. The score of 66 comes mostly from the missing
h1(critical) and the missing description. HN ranks regardless, which is a reminder that these checks are hygiene, not ranking factors. -
Wikipedia. No meta description is a warning here, but Google writes its own snippet for such pages. The
sitemapUrlsCountis 0 because/sitemap.xmlis not served at the root. The Actor reports 0 and does not raise an issue for it.
Using it from Claude or Cursor
The same Actor runs as an MCP server in Standby mode. This is the config from the README:
{
"mcpServers": {
"seo-audit": {
"url": "https://mr-wolf-1--seo-audit-mcp-server.apify.actor/mcp",
"headers": { "Authorization": "Bearer YOUR_APIFY_API_TOKEN" }
}
}
}
It has three tools: audit_seo_page, inspect_site_crawlability and compare_seo_pages (up to 5 URLs). I tested the tools through the stdio transport on my machine, not through the hosted endpoint. compare_seo_pages on apify.com and Hacker News returned this, trimmed:
{ "count": 2, "pages": [
{ "url": "https://apify.com/", "seoScore": 100, "titlePixelWidth": 405, "h1Count": 1,
"jsonLdTypes": ["Organization", "WebSite", "SoftwareApplication"], "criticalIssues": 0 },
{ "url": "https://news.ycombinator.com/", "seoScore": 66, "titlePixelWidth": 116, "h1Count": 0,
"jsonLdTypes": [], "criticalIssues": 1 }
] }
Prompts that work well with it:
- "Audit https://example.com/pricing and list only critical and warning issues with the fix for each."
- "Compare my product page with these three competitor pages. Who has structured data and who does not?"
- "Check whether this domain declares its sitemap in robots.txt and how many URLs it has."
Cost
The pricing is pay per event: $0.005 per audited page, $0.005 per MCP tool call, and $0.00005 for the Actor start (free tier prices, lower on paid plans). The four-page run above costs $0.00005 + 4 x $0.005 = $0.02005. A weekly audit of 50 landing pages is about $0.25 per run. One compare_seo_pages call on 5 URLs is a single $0.005 MCP query.
REST call for a scheduled job or an n8n HTTP node:
curl -X POST "https://api.apify.com/v2/acts/mr.wolf~seo-audit-mcp-server/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"urls":["https://example.com/pricing"],"includeCrawlability":false}'
Limits
- The pixel width is an estimate. It uses a hardcoded Roboto-Regular table for ASCII. Accented letters and other non-ASCII characters get a flat 550 units, and characters from CJK ranges get 1000. A title in Italian with several accents will be slightly off. Google's real font and thresholds also change, so treat 580 px as a good approximation.
- No JavaScript rendering. Client-rendered pages (some single-page apps) return their empty shell. What you see is what a crawler sees before running scripts.
- The Flesch score is unreliable on navigation-heavy pages. It was 0 for three of the four pages above because they have long runs of text without sentence punctuation. It only looked meaningful on the Wikipedia article (36). I would ignore it outside long-form articles, and it uses an English syllable heuristic.
-
Sitemap counting is basic. It reads one sitemap (the first
Sitemap:line, or/sitemap.xml) and counts<loc>entries. For a sitemap index that is the number of child sitemaps, not pages. That is probably why apify.com shows 24. - No Core Web Vitals, no backlinks, no ranking data. It is a single-page technical check, not a crawler. It does not follow links or check for broken ones.
- Some sites block datacenter IPs or serve different HTML to bots. The Actor sends a browser-like request with
got-scraping, but it can still get a different page than you see.
Try it
Store page: apify.com/mr.wolf/seo-audit-mcp-server. Source: github.com/Mr-Wolf-Dev/seo-audit-mcp-server. If a check gives a wrong answer on your site, open an issue with the URL.
This post was drafted with AI assistance and checked against live runs of the Actor before publishing.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.