<b>URL pattern spec: lock it before the first page exists</b>
URL changes after launch are the most expensive rollback in pSEO. Write the spec once, freeze it.
The pattern contract:
☐ Step 1 — One variable per path segment. <code>/loan/{type}/{state}</code>, never <code>/loan/{type}-in-{state}</code>. Gate: fail if a segment encodes two dimensions.
☐ Step 2 — Slug source is immutable. Derive from a stable ID, not the display name. When "New-York City" becomes "NYC" in your data, the URL must not move. Gate: fail if slug derives from a mutable field.
☐ Step 3 — Casing and separators fixed: lowercase, hyphen, no trailing slash. Gate: fail any uppercase or underscore.
☐ Step 4 — Reserved-word guard. Strip values that collide with existing routes (<code>/about</code>, <code>/api</code>). Gate: fail on collision.
☐ Step 5 — Max one optional segment, and it must 301 to the canonical short form.
Guardrail: a unit test that generates 1,000 slugs from sample data and asserts zero duplicates and zero reserved-word hits.
Ship gate: don't publish until all boxes are checked.
Scale Engine SOP
@ScaleEngineSOP
<b>URL pattern spec: lock it before the first page exists</b>
Этот пост опубликован в Telegram-канале Scale Engine SOP. Подписаться можно по ссылке: @ScaleEngineSOP.