Go, Go, Godot!
  • 0
Godot and Netlify

Quickly deploying Godot games on the web with Netlify

January 22, 2023

When I think of video games, I generally still think of an application that is downloaded and runs on the client. Technically, that’s still the case with web-based exports from Godot Engine, since the web browser has to download the files before being able to run them.

I thought maybe I could just run the index.html file locally, but that does not work, as the web-based games with Godot Engine rely on modern browser features that require specific opt-in settings from the web server. If you try to just run the “index.html” file directly, you’ll be greeted with the following type of message instead of the game:

Hosting with Netlify is super simple. Create a new manual deployment, create a zip from the exported files, and upload it. It’ll show the same error message until Netlify is configured to allow the required features. Simply add a netlify.toml configuration file with the following contents:

# netlify.toml
[[headers]]
  for = "/*"
  [headers.values]
    Access-Control-Allow-Origin = "*"
    Cross-Origin-Opener-Policy = "same-origin"
    Cross-Origin-Embedder-Policy = "require-corp"

That’s all it took for a Godot Engine web export to come to life.

developer experienceweb
Posted in DX, Godot.
Share
PreviousDynamically finding and loading resources from the Filesystem for Android and Web Exports
NextIs Godot is the Linux of Game Engines?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related Posts

  • November 17, 2022

    Making videos for the web with Godot 4’s Movie Writer

    Normally I use OBS for screen recording, but there are cases where it makes sense to use Godot’s built-in movie writer that was recently announced. For example, if you have a slow PC or really demanding game, OBS will skip frames. It makes sense since OBS is just recording what’s on the screen in real …

  • January 3, 2024

    2D Fog Effect Shader Tutorial

    The shader used in the tutorial: https://godotshaders.com/shader/2d-fog-overlay-2/

  • February 29, 2024

    Inventory System v1.12 available

    Crafting is here! The latest inventory system version is now available with the following features: The bug fixes:

  • Godot Game Engine Logo
    March 1, 2023

    Godot Engine 4.0 released!

    Godot Engine 4.0 has been released per official announcement. With version 4.0, Godot has gone through “3+ years of breaking and rebuilding from the ground up, a complete core overhaul and a full engine rewrite, through 17 alphas, 17 betas and 6 release candidates“. The announcement post is credited to “2000+ Godot contributors.” It’s a …

    © 2025 GoGoGodot.io. All rights reserved.