BuildMyRank didn’t die because Google discovered a single sketchy link.
Faceted navigation is where crawl budget quietly dies. Every filter permutation, sort order, tracking parameter, and case variant creates another URL the crawler can discover, and most origins are too slow or too stateful to normalize that surface consistently. Cloudflare Workers are a good fit for the job because they sit in the request lifecycle before the origin, can terminate redirects at the edge, and can stream-transform HTML without buffering the whole document. The goal is not to “do SEO at the edge” as a gimmick; it is to make URL space deterministic, reduce origin round trips, and keep canonical signals aligned with what the crawler can actually fetch.
Start with the request object and treat URL normalization as a pure function. Parse the URL, lowercase the host, strip tracking parameters, collapse duplicate query keys, sort the remaining parameters, drop empty values, and enforce a single trailing-slash policy. If the normalized URL differs from the request URL, return a 301 for GET/HEAD and a 308 when method preservation matters. Keep the redirect map single-hop. Redirect chains are easy to create when a worker normalizes one dimension and an origin rule normalizes another, so the worker should own the full canonicalization contract or explicitly defer to origin rules. A static rule bundle generated at build time and deployed with Wrangler is usually better than Workers KV for hot-path redirects; KV’s eventual consistency is fine for admin metadata, not for a crawl path where a stale value can produce a 404 or a loop. Durable Objects are useful for coordination, not for every facet request.
Redirects alone are insufficient if the HTML still advertises a different canonical. Use HTMLRewriter to stream-rewrite `link[rel=canonical]`, `meta[property=“og:url”]`, and any hreflang URLs to the normalized form. HTMLRewriter is a streaming transform, so you avoid full DOM parsing and keep time-to-first-byte sane. For pages where the canonical can be expressed as a response header, a `Link: <...>; rel=“canonical”` header is cheaper, but do not send conflicting signals. Pick one source of truth and make sure the origin, the edge transform, and the sitemap agree. If you rewrite HTML, strip or weaken strong ETags because the body no longer matches the origin representation. Preserve status codes and cache directives unless you have a deliberate override.
The cache is where edge SEO gets dangerous. Canonicalization must be deterministic per cache key. Do not vary canonical URLs by cookie, geo, or A/B bucket unless the cache key includes those dimensions and you have accepted the hit-rate cost. A worker that rewrites canonicals based on a personalization cookie is a cache-poisoning vector with an SEO incident attached. Normalize the cache key after redirects, keep redirect responses cacheable where appropriate, and use Cache Rules or the Cache API deliberately rather than hoping default caching does the right thing. For parameter-heavy facets, a worker can return a 410 for dead combinations or inject `X-Robots-Tag: noindex` for low-value permutations, but those responses should be deterministic and testable. Edge-injected noindex is powerful and easy to misuse; treat it like a production policy, complete with staging checks and Logpush monitoring.
The operational win is feedback latency. Instead of shipping origin releases to fix a trailing slash or query-order bug, you can deploy a worker rule, verify redirect behavior with curl and synthetic crawls, and watch cache hit ratios and status-code distributions. That is the real growth hack: shrink the time between discovering a canonicalization defect and removing it from the crawl path, without asking the origin to do work it was never designed to do.



