On 1 November 2026, an audit of the StackEndBox homepage found a small inconsistency that a browser-tab check had missed.
The HTML title already contained the company name. The Open Graph and Twitter titles still said “We design and build the software your business needs.” A separate page extractor returned that generic sentence as its page label. Its output matched the Open Graph field, while the browser tab remained correctly branded.
Both observations were accurate. They described different title sources.
Three fields, two answers
The initial page contained this combination:
<title>StackEndBox | Product Engineering, AI & Custom Software</title>
<meta property="og:title" content="We design and build the software your business needs.">
<meta name="twitter:title" content="We design and build the software your business needs.">
The release aligned the two share titles with the existing HTML title. It preserved the heading, design, canonical URL, robots directive and company schema.
| Field | Before | After |
|---|---|---|
| HTML title | Branded | Branded |
| Open Graph title | Generic sentence | Same branded title |
| Twitter title | Generic sentence | Same branded title |
This is a useful homepage policy when every surface should identify the same company. Other pages can legitimately use different social copy. Agree on a per-page expectation before turning consistency into a release gate.
Why checking only document.title misses the problem
A test that asserts document.title will pass for the initial page above. A test that uses querySelector for each metadata field can also overlook duplicate tags because it returns only the first match.
Collect every matching tag and keep the arrays intact:
const snapshot = await page.evaluate(() => ({
title: [...document.head.querySelectorAll("title")]
.map(el => el.textContent ?? ""),
"og:title": [...document.head.querySelectorAll(
'meta[property="og:title"]'
)].map(el => el.getAttribute("content") ?? ""),
"twitter:title": [...document.head.querySelectorAll(
'meta[name="twitter:title"]'
)].map(el => el.getAttribute("content") ?? "")
}));
This collection is read-only. It assumes an existing Playwright-compatible page handle and should run after the application has reached its rendered-ready state. Choose that state for your application instead of adding an arbitrary delay.
The arrays make four separate findings visible: a missing field, duplicate fields, an empty value and a value that differs from the reviewed expectation. DOM values have already decoded HTML entities, so compare the rendered ampersand with an ampersand rather than the source spelling &.
A runnable contract check
The public audit module and instructions contain a dependency-free function and eight synthetic example cases. The function accepts the snapshot above and an expected title:
const result = auditTitleSnapshot(
snapshot,
"StackEndBox | Product Engineering, AI & Custom Software"
);
if (!result.ok) {
throw new Error(JSON.stringify(result.issues));
}
The examples cover aligned values, generic Open Graph copy, missing Twitter metadata, duplicate Open Graph tags, an empty title, three generic fields, surrounding whitespace and a malformed snapshot. All eight passed when executed in a JavaScript isolate. The public file includes the examples so readers can rerun them.
Those examples test the comparison contract. Collecting the correct page and waiting for its rendered state remain responsibilities of the browser test.
Verify the artifact that actually ships
This homepage uses a preserved static release. Editing future application source alone would leave the served artifact unchanged. The correction therefore covered the served response and future source, with validation around the known metadata structure.
The production change went through source checks, canonical release checks, provider preflight and hosted staging before publication. After publication, a browser reload showed exactly one of each title field with the branded value. A fresh independent fetch then returned the branded label too.
For another application, the implementation may simply be a shared metadata object. The acceptance question stays the same: does the response and rendered page that readers receive contain the reviewed values?
Keep search outcomes separate
Google documents Open Graph titles among the sources it can use for search-result title links. That makes the field worth checking alongside the HTML title and visible heading. Google chooses the resulting title automatically and has to recrawl and reprocess updates.
The metadata correction established a consistent page. It did not establish a ranking improvement. The ordinary company-name query still received a spelling substitution immediately after deployment. A title audit cannot measure indexability, Google’s interpretation of a brand query or search position.
A practical release checklist is therefore two-part: verify the page contract you control, then observe search behaviour separately. Passing one check should never silently mark the other complete.
Top comments (0)