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 …

  • February 22, 2024

    Inventory System v1.10 available

    We’re excited about this release, which includes a range of quality-of-life additions and refinements. Drag-and-drop support has been improved with a second strategy: Click-and-release: Simply clicking (and releasing) an item will pick it up. This leverages Godot’s force-drag functionality and approximates the drag-and-drop behavior that games like Valheim and Palworld use in their inventory items. …

  • Godot Game Engine Logo
    September 15, 2022

    Godot Engine 4 reaches beta

    Just a couple of days ago, Godot 4.0 alpha 17 was announced. Today, Godot Engine 4.0 beta 1 was released. Be sure to check out the announcement. There are lots of improvements across the board; rendering, lighting, physics and navigation, animation, and scripting.

  • Wave Shooter title screen
    May 11, 2023

    The Pause Handler: Working around Godot 4’s particle jitter bug

    Godot Engine 4 has a bug (#50824) that causes particle jitter when the game is paused. It does look quite distracting. The Bug in Action This is a proof-of-concept wave shooter running in Godot Engine 4.0.2. Pausing the game was initially just a simple process_mode toggle. But as shown in the video clip above, there …

    © 2025 GoGoGodot.io. All rights reserved.