How to host a Webflow export on Cloudflare Pages
To host a Webflow export on Cloudflare Pages, unzip the WebExport download and run npx wrangler pages deploy ./exported-site --project-name my-site. Add _redirects with explicit 301 codes, make sure the folder has a 404.html, and replace Webflow forms with a form service or a Pages Function.
Last reviewed
Key facts
- The default status in a Pages _redirects line is 302, so write 301 for permanent moves.
- Without a 404.html, Pages answers unknown paths with index.html and a 200 status.
- Direct upload projects cannot switch to Git integration later.
- Webflow’s help says forms do not work in exported code.
What a Webflow export brings to Cloudflare Pages
A WebExport copy of a Webflow site is a folder of finished pages with local CSS, scripts, fonts and images. Cloudflare Pages accepts it by direct upload, with no build command. The limits are generous for this kind of site: Pages allows 25 MiB per file and 20,000 files per deployment on the free plan, and most Webflow exports sit far below both.
When a path matches no file and the folder has no 404.html, Pages falls back to the root index.html. Visitors then see your home page at a broken URL with a 200 status, and search engines treat it as a duplicate. Add the 404.html before you point the domain.
Deploy with Wrangler direct upload
- Unzip the download into a folder that holds index.html at the top.
- Create a Pages project once, then deploy the folder to it.
- Open the pages.dev address the command prints and test a few URLs.
- Attach your domain from the project’s custom domains tab.
npx wrangler pages project create my-site
npx wrangler pages deploy ./exported-site --project-name my-siteRedirects, headers and 404s on Cloudflare Pages
Cloudflare Pages reads _redirects and _headers from the output directory. A redirect line is the source, the destination and an optional status code, and the default is 302, so write 301 for permanent moves. The limits are 2,000 static and 100 dynamic redirects, with each declaration capped at 1,000 characters, and 100 rules in _headers. If the folder has no 404.html, Pages answers unknown paths with the root index.html, so add a 404.html to get real 404 responses.
Save this as _redirects in the folder root. Every permanent move gets its code written out, and the first matching rule wins, so keep the specific lines above the wildcard ones.
/home / 301
/blog/category/news /blog 301
/posts/* /blog/:splat 301The paths are samples for a renamed CMS folder and two removed pages. Pages allows 2,000 static and 100 dynamic redirects, with 1,000 characters per declaration. A line that does not follow the format is ignored without an error, so deploy to a preview URL and request each old path to confirm it moves.
Webflow output that needs fixing on Cloudflare Pages
| In the Webflow output | What to do on any static host |
|---|---|
| Forms handled by webflow.js | Webflow’s help lists forms as not working in exported code. Change each form action to a new endpoint and test a real submission. |
| Site search, Logic and memberships | These run on Webflow’s servers. Remove the elements or replace them with a third-party service. |
| Lottie files and inline style backgrounds | Lottie animations load a JSON file from a data-src attribute, and inline styles can hold image URLs. Search the folder for website-files.com to catch leftovers. |
| CMS content frozen at export time | Each CMS item becomes an HTML file. A new post in Webflow shows up on your host only after you export again. |
Give each Webflow form an action that points at a service you control and test a submission, since Webflow’s help lists forms as not working in exported code. Remove site search, Logic and membership elements, which run on Webflow’s servers. Then search the folder for website-files.com to find Lottie data-src values and inline styles that still point at the Webflow CDN.
Forms and dynamic features
Static files cannot receive a POST. Either use a form service, or add a Pages Function under a functions folder that handles the request. Redirects and the _headers file do not apply to responses a Function generates.
Pages Functions can receive the POST. Create a functions folder with a file such as contact.js that handles the request, or use a hosted form endpoint. Remember that headers from _headers do not apply to what a Function returns.
What can go wrong
- A folder without 404.html makes every broken URL return your home page with a 200 status.
- A redirect line with a typo is ignored silently, and the old URL then 404s.
- More than 2,100 redirects in the file need Bulk Redirects instead.
Frequently asked questions
Is Cloudflare Pages free for a Webflow export?
Pages has a free plan with limits on files and builds. Check Cloudflare’s limits page for the current numbers, because a static export uses no builds at all with direct upload.
Why do my broken Webflow URLs show the home page?
The folder has no 404.html, so Pages falls back to index.html. Add a 404.html at the top level and unknown paths return a real 404.
Which redirect code does Pages use by default?
A 302. Write 301 or 308 in each line for permanent moves so search engines treat them as permanent.
Can I connect a Git repository later?
Not to a direct upload project. If you want Git deploys, create a Git-connected project from the start and commit the exported folder.
Official documentation
Free tools for this job
- Webflow → Vercel Migration ChecklistInteractive step-by-step checklist for migrating your site off Webflow hosting.
- Webflow Code Cleanliness AuditAudit Webflow HTML for bloated interaction scripts, proprietary attributes, and form locks.
- Static Hosting PickerAnswer 5 questions and get the best hosting recommendation for your exported site.
- Static Site Hosting Cost CalculatorCompare hosting costs: Webflow vs Vercel vs Netlify vs Cloudflare Pages at scale.
Get the Webflow files first
Paste your public Webflow URL into the export form and download a ZIP you can deploy to Cloudflare Pages. The Free plan covers 1 site, 5 exports a month, 15 pages and 20 MB per export. Professional is a $9.99 one-time purchase with unlimited pages.