html.contact inherited a domain with an adult-content past. Old URLs and search results do not vanish because a new product launches. Crawlers keep asking for them.
404 Not Found was too vague. Those pages were not missing by accident. They were gone on purpose. The right response is 410 Gone.
Local development made that easy. Production did not. Cloudflare can serve a static 404 before the application Worker sees the request, which means a crawler never receives the 410.
I added a small route matcher at the start of the Worker for the retired URL families. Middleware carries the same rule as a second guard. I did not put a wildcard Worker route in front of the whole domain because that could change how forms, APIs, and ordinary assets behave.
A successful deploy is not enough proof. Edge caches and propagation can leave a custom domain on an older response for a while. The release check makes a unique request to a retired URL and waits for a real 410. It also sends a safe request through the public form path to make sure the cleanup did not damage the product.
The check retries for up to 60 seconds. A wrong response stops the release.