Overview
A reference website for a roofing contractor, built on Astro with Sanity for the content and Cloudflare Pages for hosting. The company, the jobs, the phone number and every photo are sample content. A job is entered once and the service, material and area pages are derived from it, so they cannot drift apart.
Key Features
A build that refuses to ship a broken site
- Page graph gates. The build stops on an orphan page, a dead link, an area page that survives swapping the place name, or two near-duplicate pages. An area page exists only when at least two finished jobs stand behind it.
- Structured data and search tools. JSON-LD for the business, articles and breadcrumbs, a sitemap, and Search Console and Bing verified.
- Analytics. Google Analytics and Tag Manager are connected, and a visit from a real browser put page views and click to call events in the live report.
Moving a site off a builder
- A redirect map tool. It reads the old site's address list or sitemap, matches each address to a page on the new site, writes the Cloudflare Pages redirects file with every 301 spelled out, and refuses chains, loops, a rule that would hide a live page and anything over Cloudflare's limits.
- Listed for a person, never guessed. An address it cannot match safely is listed in a report and is never sent to the home page, because a search engine reads that as a soft 404.
- A launch checklist. A before, during and after cutover list and a guide for the owner sit in the repo.
What I Tested
I served the tool's output through Cloudflare's own local Pages runtime and requested each old address of a made-up old site. That run found an old address ending in .html that returned a 404, and a rule that did not match its trailing-slash form. Both are fixed. Two independent passes then tried to break the tool, and what they found is fixed or written down as a known limit. Mobile Lighthouse gave accessibility, best practices and SEO a 100 on six pages with Tag Manager and Google Analytics loaded.
What I Learned
A rule in a redirect file matches one exact spelling of an address, so a page reachable as /team, /team/ and /team/index.html needs a rule for each. I also learned to read the tool's own output back the way Cloudflare will, since Cloudflare skips a malformed line without a word and the page simply 404s.
Tech Stack
Site: Astro, TypeScript, Sanity Hosting: Cloudflare Pages Search and analytics: JSON-LD, sitemap, Search Console, Bing Webmaster, Google Analytics, Tag Manager Testing: Node's test runner, Playwright, Lighthouse, a mutation pass over the redirect tool