# First Cloudflare deploy checklist

- Source: https://simeoncreatives.com/resources/first-cloudflare-deploy-checklist
- Hub: Website Design & Development

Get a static site from a dist folder to a custom domain without the SPA fallback, the trailing-slash loop, or an empty #root. Print this beside wrangler.

Walk it in order. Do not attach the custom domain until workers.dev (or the preview host) serves the files you expect.
This is first host, not a WordPress exit. Cutover, redirects, and Row Level Security (RLS) live on the edge migration checklist.

```mermaid
flowchart LR
    D["Build dist"] --> W["wrangler deploy"]
    W --> P["Proof host"]
    P --> C["Custom domain"]
    C --> H["curl the HTML"]
```
*Files, deploy, proof host, brand hostname, then prove the article is in the first HTML.*

## wrangler.jsonc before the first upload

A marketing site that must rank is files in dist. It is not a Node origin. Copy the knobs, then change Your project name.

| Knob | Set this | If you guess |
| --- | --- | --- |
| assets.directory | ./dist after the Vite (or other) build | You upload the repo root, or nothing useful |
| not_found_handling | 404-page | single-page-application returns index.html for junk URLs. Soft 404s. Thin pages. |
| html_handling | drop-trailing-slash | auto-trailing-slash 307s /blog/slug to /blog/slug/. Google skips indexing. |
| main / fetch handler | Omit it for a static assets Worker | You debug a script that only needed to serve files |

- [ ] Worker name is Yours, not a tutorial leftover
- [ ] dist/404.html exists before you set 404-page

## Deploy and proof host

- [ ] wrangler login on the account that will own the hostname
- [ ] Production build writes into dist (or the directory you named)
- [ ] wrangler deploy finishes without uploading source
- [ ] name.workers.dev (or the Pages preview host) loads the site
  Proof only. Do not print workers.dev on a business card.
- [ ] A junk path returns a real 404, not the homepage

## Custom domain

Search “Cloudflare website URL” and you will mix three hostnames. The brand URL is the only one clients should see.

- [ ] Custom domain attached on the Worker (or Pages project) to example.com or www
- [ ] Apex and www agree. One redirects. Canonicals match.
- [ ] If mail lives on cPanel, proxy only website hostnames. Mail Exchanger (MX) records stay DNS only.
- [ ] HTTPS padlock on the custom domain, not only on workers.dev

## Prove the HTML (the AdSense test)

Hosting does not fix an empty #root. Curl the custom domain with JavaScript off. You should read the article, not a chat widget and a title.

- [ ] curl -s the homepage and one inner URL. Visible copy is in #root, not display:none or clip:rect
- [ ] Title is complete (no truncated apostrophe from a regex scrape of source)
- [ ] Request /path (no trailing slash). You are not bounced to /path/ and back
- [ ] After this passes, keep the Cloudflare static website map for DNS, SSL, and _redirects. Do not mix both jobs on minute one.

## Related guides

- [Host a static website on Cloudflare](https://simeoncreatives.com/blog/host-a-static-website-on-cloudflare)
- [Cloudflare static website map](https://simeoncreatives.com/blog/cloudflare-static-website-map)
- [Why crawlers saw an empty React site](https://simeoncreatives.com/blog/why-crawlers-saw-an-empty-react-site)
