Exporting a Godot web project for use on Netlify’s free hosting isn’t too hard, but it does involve setting custom headers for CORS.

Export from Godot

Use the Project -> Export menu to export the project as a Web/HTML5 project. You’ll probably want to make a subdirectory just for the export, so you don’t mix it up with your project files.

The export configuration; it's set to Web (Runnable) with an export location of "./export/index.html"

You’ll probably want to call the file index.html if it’s the only thing that’s going to be on the webserver.

Set up Netlify configuration

Netlify’s web server needs to send some headers so that the Godot web app can load assets and libraries without triggering a CORS error. Godot will thankfully give you a pretty descriptive error if this configuration is set wrong.

Create a new file called netlify.toml in the directory you just exported to, and its contents should look like this:

[[headers]]
for = "/*"
  [headers.values]
    Cross-Origin-Opener-Policy = "same-origin"
    Cross-Origin-Embedder-Policy = "require-corp"

Set up a Netlify instance

After you sign up for a Netlify account, pick “Add New Site -> Deploy Manually” from the main page.

Drag and drop the export folder (the one containing your new index.html and netlify.toml files, along with any images, js files, etc that Godot exported) into the screen that results, and upload it.

After a couple seconds, you should be able to visit the site you just uploaded to. This free Netlify service is great for small demos, simple hosting, and client presentations. Keep in mind the limitations of their free service tier – primarily bandwidth limits and the lack of shared “team” accounts – if you suddenly become very popular.