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

  • July 30, 2024

    Inventory System v1.15 available

    This inventory system release refines a lot of architecture guide sections based on customer feedback and adds over 100 additional pages to the PDF guide. Features: Bug fixes:

  • October 30, 2023

    Super Godot Galaxy Concept

    Hugo-Dz created Super Godot Galaxy: https://github.com/Hugo-Dz/super-godot-galaxy, which he announced in this Reddit post. It uses the 3D Starter Kit from Kenney and shows how to achieve the effect of applying gravity toward the center of a small spherical planet.

  • February 6, 2024

    Inventory System v1.4.1 available

    This small update addresses inventory serialization to persist the allow_gaps and expiration_multiplier settings. These were previously overlooked.

  • Strings
    December 17, 2022

    When not all strings are Strings. Detect bugs in your GDscript more easily with static typing

    One of the benefits of working with Godot Engine is that GDScript allows one to operate high level. GDScript is dynamically typed, so not even variable types have to be specified, but I would strongly recommend using static typing wherever possible. It can help with performance but primarily adds clarity when trying to follow the …

    © 2025 GoGoGodot.io. All rights reserved.