feat(seo): rewrite the C1 snippets to earn the click (W8)
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m3s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 11s
PR Checks / Build Frontend (no push) (pull_request) Successful in 44s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 10s
PR Checks / AI Code Review (Claude) (pull_request) Failing after 11s
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m3s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 11s
PR Checks / Build Frontend (no push) (pull_request) Successful in 44s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 10s
PR Checks / AI Code Review (Claude) (pull_request) Failing after 11s
The baseline says these pages already rank and are not clicked. 'compare school performance' sits at position 6.1 with 0.43% CTR; 'compare schools' at 7.2 with 0.87%. The brand query 'school compare' draws 9.16% from the same neighbourhood of the same results page, which rules out a ranking explanation — when the snippet gives a reason to click, it gets clicked. These SERPs are owned by the DfE's own 'Compare school performance' service. The old title put a lowercase brand nobody searches for in the most valuable pixels, then a near-paraphrase of that service's name. Beside the government's own result it read as a lookalike. Intent in the title, differentiator in the description. Titles now match what people type, and the descriptions carry the one fact gov.uk does not publish: how close you had to live to get a place. /compare deliberately takes the tool phrasing rather than the homepage's, so the two pages stop competing for one phrase. The root layout's default and Open Graph copy were saying something different again; they now agree. No hard school counts in any of it. The corpus moves with every data refresh and this repo has already shipped one copy bug of that kind. Tests guard the mechanics — SERP length, intent keyword, the differentiator, no brand-first title — and leave the wording free to iterate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015mWQnpye9F299NVRCCSRvj
This commit is contained in:
1 parent
4a3928df9f
commit
c0547c45e5
7 files changed
+147
-14
No files matched your search
@@ -1726,3 +1726,35 @@ test('a school page on staging is noindexed too, not just the homepage', async (
|
||||
const res = await page.request.get(`/school/${first.urn}-x`);
|
||||
expect(res.headers()['x-robots-tag']).toContain('noindex');
|
||||
});
|
||||
|
||||
/*
|
||||
* W8 — the C1 pages must ship a description, and it must differentiate.
|
||||
*
|
||||
* Baseline was 0.43% CTR at position 6.1 on "compare school performance",
|
||||
* against 9.16% for the brand query from the same neighbourhood. The SERP is
|
||||
* owned by the DfE's own service, so a description that paraphrases it earns
|
||||
* nothing. Google may rewrite a snippet, but it cannot use one we never sent.
|
||||
*/
|
||||
test('every C1 page ships a description, and none opens its title with the brand', async ({ page }) => {
|
||||
for (const path of ['/', '/compare', '/rankings', '/admissions']) {
|
||||
await page.goto(path);
|
||||
|
||||
const desc = await page.locator('meta[name="description"]').first()
|
||||
.getAttribute('content');
|
||||
expect(desc, `${path} must ship a description`).toBeTruthy();
|
||||
expect(desc!.length, `${path} description too short to be worth reading`)
|
||||
.toBeGreaterThan(100);
|
||||
|
||||
const title = await page.title();
|
||||
expect(title.toLowerCase().startsWith('schoolcompare'),
|
||||
`${path} spends its most valuable pixels on the brand`).toBe(false);
|
||||
}
|
||||
});
|
||||
|
||||
test('the homepage snippet names what gov.uk does not publish', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
const desc = await page.locator('meta[name="description"]').first()
|
||||
.getAttribute('content');
|
||||
// Admissions distance is the one fact the DfE service has no equivalent for.
|
||||
expect(desc).toMatch(/close you had to live|distance/i);
|
||||
});
|
||||
Reference in new issue
Block a user