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

  • August 1, 2022

    Godot Engine on the Steam Deck – Developing games on the go?

    Once I found out about the Steam Deck’s Desktop Mode, it got even more interesting. Steam Deck’s Gaming Mode vs Desktop Mode You see, the Steam Deck defaults to an analog of Big Picture mode on PC. It runs full screen in “Steam Deck gaming console” mode. But underneath all that is a Linux system …

  • 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 …

  • October 24, 2024

    Inventory System v1.17 available

    A new version of the Inventory System is available. This release includes various refinements to existing systems to flesh out more combat-related functionality. Inventory Ammo Provider The GGAmmoProvider component is responsible for providing ammunition to equipped weapons. Previously, it only had a “simple” strategy: Creating ammunition out of thin air. The new GGAmmoProviderInventoryStrategy pulls ammunition …

  • July 17, 2023

    Terrain3D for Godot has been released

    The Terrain3D addon for Godot lets you create and manage 3D terrains within Godot. It looks quite promising for making landscapes, hills, valleys, and other natural environments. The addon provides tools for sculpting the terrain, and you can paint different textures like grass, dirt, or rock, and blend them smoothly. It also supports features like …

    © 2025 GoGoGodot.io. All rights reserved.