How to host a Webflow export on Amazon S3

Short answer

To host a Webflow export on Amazon S3, create a bucket with static website hosting, make it publicly readable, then run aws s3 sync ./exported-site s3://my-bucket --delete. The website endpoint is HTTP only, so add CloudFront for HTTPS. Replace Webflow forms with an outside endpoint, since S3 serves files and runs no code.

Last reviewed

Key facts

  • S3 website endpoints do not support HTTPS, so CloudFront sits in front for TLS and your domain.
  • An S3 error document only handles 4XX errors.
  • aws s3 sync guesses each file’s content type from its extension by default.
  • Webflow’s help says forms do not work in exported code.

What a Webflow export brings to Amazon S3

A WebExport copy of a Webflow site is a folder of finished HTML, CSS, scripts, fonts and images. S3 stores them as objects and the website endpoint serves them as pages. The setup is a few settings and one command, and the running cost depends on storage and transfer, so use the hosting cost calculator for your own traffic instead of a general number.

Plan caching before you upload. Webflow pages change when you publish, but fonts and images rarely do. Uploading in two passes lets you give pages a short cache time and assets a long one, and CloudFront then respects both.

Create the bucket and sync the folder

  1. Create a bucket and turn on static website hosting with index.html as the index document and 404.html as the error document.
  2. Turn off Block Public Access for that bucket and attach a bucket policy that allows s3:GetObject for everyone.
  3. Upload the folder with the AWS CLI, using --delete so removed pages disappear from the bucket.
  4. Put CloudFront in front of the website endpoint for HTTPS and your own domain.
terminal
aws s3 sync ./exported-site s3://my-bucket --delete

Redirects, headers and 404s on Amazon S3

The S3 website endpoint is HTTP only and has no header configuration, so security headers and HTTPS come from CloudFront. An S3 error document covers 4XX responses, and routing rules are limited to 50 per website configuration. For single pages you can set the x-amz-website-redirect-location metadata on an object, and the website endpoint answers it with a 301. Index documents work at every folder level on the website endpoint, but not through the REST endpoint.

Run two syncs. The first uploads everything except pages with a one week cache. The second uploads the HTML files with no-cache so edits show up straight away.

terminal
# assets: cache for one week
aws s3 sync ./exported-site s3://my-bucket --delete \
  --exclude "*.html" --cache-control "public, max-age=604800"

# pages: always revalidate
aws s3 sync ./exported-site s3://my-bucket --delete \
  --exclude "*" --include "*.html" --cache-control "no-cache"

The AWS CLI says files excluded by a filter are also excluded from deletion, which is why --delete appears in both commands. Run either one with --dryrun first to read the plan. Sync compares size and modification time, so files that did not change are skipped and keep their old headers.

Webflow output that needs fixing on Amazon S3

Webflow export: what to check
In the Webflow outputWhat to do on any static host
Forms handled by webflow.jsWebflow’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 membershipsThese run on Webflow’s servers. Remove the elements or replace them with a third-party service.
Lottie files and inline style backgroundsLottie 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 timeEach 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 to a service you run or rent, because the static bucket cannot receive a POST. Remove Webflow site search, Logic and membership elements. Then search the folder for website-files.com, where Lottie data-src values and inline styles keep CDN links. Finally open the bucket website URL and check that CMS item pages load without the .html ending, since S3 does not strip it for you.

Forms and dynamic features

S3 serves files and nothing else. Use a form service, or send the form to an API Gateway endpoint backed by a function you write.

Pick a form service, or build a small endpoint with API Gateway and a function. Either way the form action becomes an absolute https URL, because the bucket itself accepts only GET and HEAD on the website endpoint.

What can go wrong

  • Block Public Access left on makes every page return 403, even with a correct policy.
  • The website endpoint serves plain HTTP. Browsers will warn on forms and sign-ins until CloudFront is in place.
  • Clean URLs such as /about need an object named about with the right content type, or a folder with an index.html. A bare about.html is only reachable at its full name.

Frequently asked questions

Can I serve a Webflow export from S3 over HTTPS?

Not from the website endpoint, which is HTTP only. Put a CloudFront distribution in front of it and attach a certificate for your domain.

What does the --delete flag do in aws s3 sync?

It removes objects from the bucket that no longer exist in your folder, so deleted pages disappear. Files excluded by your filters are not deleted.

How do I serve /about instead of /about.html?

Either upload each page as about/index.html, which the website endpoint serves at the folder path, or keep the .html names and link to them. Check how your export names pages first.

Do I need an S3 bucket policy for a public site?

Yes. Turn off Block Public Access for the bucket and add a policy that allows s3:GetObject on the objects, as the AWS website hosting docs show.

Official documentation

Free tools for this job

Get the Webflow files first

Paste your public Webflow URL into the export form and download a ZIP you can deploy to Amazon S3. 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.