How to host a Wix export on Cloudflare Pages

Short answer

To host a Wix export on Cloudflare Pages, unzip the WebExport download and run npx wrangler pages deploy ./exported-site --project-name my-site. Wix says standard sites cannot be hosted elsewhere, so the copy is a saved render. Add a 404.html so broken URLs return a real 404, and replace Wix backend features.

Last reviewed

Key facts

  • Wix’s help says standard Wix sites cannot be exported to another host.
  • Pages searches for the closest 404.html up the folder tree.
  • With no 404.html, Pages serves index.html for unknown paths.
  • Bookings, Stores, Members and forms run on Wix and need replacements.

What a Wix export brings to Cloudflare Pages

WebExport saves the rendered pages of a Wix site along with the scripts, fonts and images, then rewrites their paths. Cloudflare Pages serves the folder by direct upload. Since Wix pages are drawn by JavaScript, the saved scripts must be complete, and the quickest way to confirm that is to load the preview URL with the cache disabled.

A Wix site is a good candidate for the 404 rule that Pages applies. Wix sites often have a handful of pages and a blog. If a visitor mistypes a post address and the folder has no 404.html, Pages answers with the home page, and the broken link never shows up in your reports.

Deploy with Wrangler direct upload

  1. Unzip the download into a folder that holds index.html at the top.
  2. Create a Pages project once, then deploy the folder to it.
  3. Open the pages.dev address the command prints and test a few URLs.
  4. Attach your domain from the project’s custom domains tab.
terminal
npx wrangler pages project create my-site
npx wrangler pages deploy ./exported-site --project-name my-site

Redirects, 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.

Create 404.html at the top of the folder. Pages uses the closest one it finds, so one file at the root covers every path.

exported-site/404.html
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="robots" content="noindex">
  <title>Page not found</title>
</head>
<body>
  <h1>Page not found</h1>
  <p>That address does not exist. <a href="/">Go to the home page</a>.</p>
</body>
</html>

Pages returns this file with a 404 status. The noindex tag keeps the error page itself out of search results. A top-level 404.html also turns off the fallback to index.html. Style the page with your site’s CSS file if you want it to match.

Wix output that needs fixing on Cloudflare Pages

Wix export: what to check
In the Wix outputWhat to do on any static host
Scripts from parastorage.com and wixstatic.comWix pages are rendered by JavaScript. Confirm the local script files load and no request still goes to Wix.
Wix backend featuresWix says standard sites cannot be hosted elsewhere, so Bookings, Stores, Members and forms stay on Wix. Replace each one.
Image URLs with resize steps in the pathPaths such as /v1/fill/w_ and h_ are sized for the live layout. Check image sharpness at wide screens.
Mobile and desktop layoutsWix builds layouts for several widths. Test at phone and desktop width before you switch the domain.

Open the network tab and look for requests to wixstatic.com and parastorage.com. Any that remain mean the page still depends on Wix. Then replace what ran on the Wix backend: contact forms, bookings, the store and member areas. Wix Studio users should also read Wix’s developer docs, which describe a separate code export that was marked early-stage.

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.

Use a hosted form service or a Pages Function for contact forms. Bookings and stores need an outside service, and you can link to it from the saved pages.

What can go wrong

  • Without the 404.html, broken URLs return the home page with a 200 status.
  • A noindex tag copied onto real pages would hide them from search. Keep it on the 404 file only.
  • Scripts that still call Wix servers fail once the Wix plan ends.

Frequently asked questions

Does Cloudflare Pages host Wix sites?

It hosts a static copy. WebExport saves the public pages as files, and Pages serves them. Wix backend features do not come with the copy.

Where should the 404.html file go?

At the top of the folder you upload. Pages looks for the closest 404.html up the directory tree, so the root file covers all paths.

Is the Wix mobile layout kept?

The saved CSS carries the layouts Wix built for each width. Test at phone and desktop sizes on the preview URL, because a missed style shows at one size first.

Can I use Wrangler from a CI job?

Yes. Wrangler can run in a CI step with an API token, using the same pages deploy command. Keep the token in your CI secrets store.

Official documentation

Free tools for this job

Get the Wix files first

Paste your public Wix 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.