DEV Community

EditPdfree
EditPdfree

Posted on

One URL per intent: killing duplicate routes on a static site

A static site I maintain had three URLs for the same intent per city: /balma/, /livraison-alcool-balma, and a subdomain. Google saw duplicates and indexed none of them well. Here's the cleanup.

Consolidation strategy

  • Pick one canonical route per intent (I kept the flat /livraison-alcool-{city}).
  • 301 everything else to it in _redirects (/balma/* -> /livraison-alcool-balma 301).
  • Drop the redirected URLs from the sitemap (a sitemap should only list indexable, 200-status URLs).

Don't ship your build sources

Cloudflare Pages deploys the whole folder. I was accidentally serving .py generators and .bak files publicly. Moving them out of the deploy directory fixed it — important if any script contains keys.

Result

  • ~190 pages, sitemap now lists only canonical URLs;
  • duplicate-route similarity down from ~0.95 to <0.45 after rewriting the body with real local data.

Live: epicerie-de-nuit-toulouse.com (a night grocery delivery in Toulouse).

The general rule: one intent, one indexable URL, everything else redirects.

Top comments (0)