TL;DR: Build configuration Set the build command and output directory in the Wrangler file ( # Workflow: static site on Workers Static Assets ## 1. `[assets]`

## Fix
1. Build configuration Set the build command and output directory in the Wrangler file (.
   Expected: this specific failure stops.
2. Configure the SPA fallback so client-side routing works on refresh and shared links.
   Expected: this specific failure stops.
3. Headers and redirects Use.
   Expected: this specific failure stops.
4. Custom domain and SSL Attach the custom domain, confirm Full (strict) SSL, and verify the apex and www both serve (redirect one to the other with a Single Redirect, specific rule first). ## Checklist - Output directory correct, SPA fallback on, deep links tested after deploy. - Headers file reviewed: no.
   Expected: this specific failure stops.

## Details
# Workflow: static site on Workers Static Assets ## 1. `[assets]` config): the framework's build output directory is what gets served. A wrong directory serves an empty site with a 200. ## 2. SPA fallback Single-page apps need the fallback route: deep links ( `/dashboard/settings` ) must serve `index.html` , not 404. This is the blank-page-on-refresh bug, and it only appears after deploy. ## 3. `_headers` `_redirects` Prefer `_redirects` Cache rules Versioned/fingerprinted assets get long edge TTLs; HTML gets short or no cache. Pair with the invalidation workflow: new deploy, new asset URLs, purge HTML by tag. ## 5. `no-store` on assets you want cached, no long max-age on HTML. - curl the apex, www, and a deep link: all three must behave.

## When to use
You hit exactly this: Workflow: launching a static site on Workers Static Assets in Workflow.

## When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.

## Compatibility
Workflow.

## Edge cases
- for security and cache headers (long immutable cache on fingerprinted assets, no-cache on HTML) and.
- for vanity URLs and legacy paths.
- for static mappings; Single Redirects for dynamic ones. ## 4.