- Docs
- Developer guide
- Hosting your game: where to start
Hosting your game: where to start
A few hosts that serve a game over https and can be set up to work in the frame, how to get a folder online on each, and the header file for each one.
Your game stays on your own host, and its page here shows it in a frame (see
hosting requirements). If you do not have a host yet, this page
walks through a few, from a folder with index.html in it to the address you
submit.
These hosts are run by other companies. Synthcade is not affiliated with them and does not vouch for them. Each sets its own plans, limits and terms, which can change, so check them before you rely on one. We list them because they serve games over https and can be set up to work in our frame. They are in alphabetical order, which is not a ranking.
The header file
Most of the work is two headers: one that lets this site show your game in a
frame, and none that forbids it. This is the _headers file. Cloudflare and
Netlify read it as it is; the sections below give the same headers in the
format the other hosts use.
# _headers: lets Synthcade show your game in its frame.
# For Cloudflare (Pages, or Workers static assets) and Netlify.
# Put it next to your index.html, named _headers with no extension.
# What each line does: https://synthcade.net/docs/developers/hosting-your-game
# Every file: the sites allowed to show the game in a frame.
# Do not add X-Frame-Options: it would block the frame.
/*
Content-Security-Policy: frame-ancestors 'self' https://synthcade.net https://synthcade.lol https://synthcade.org https://synthcade.games
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
# The page itself: check for a new build on every visit, so an update shows at once.
/
Cache-Control: no-cache
/index.html
Cache-Control: no-cache
# Only for a folder whose file names change with every build (hashed names,
# such as Vite's assets/index-3f9a1c.js): keep them for a year. Remove the #
# from the next two lines and change the folder name to yours.
# /assets/*
# Cache-Control: public, max-age=31536000, immutable
Download it as a file, or copy it from above. What each part does:
Content-Security-Policy: frame-ancestorsnames the sites that may show your game in a frame: your own ('self') and every address this site is served from.- No
X-Frame-Options. That older header would block the frame. Whenframe-ancestorsis present, browsers ignore it anyway, but leave it out. X-Content-Type-Options: nosniffmakes browsers trust the file types your host sends, rather than guess.Referrer-Policy: strict-origin-when-cross-originsends other sites only your game's address, never the full path.Cache-Control: no-cacheon the page makes browsers check for a new build on every visit, so an update shows at once.- A year of caching for hashed files is off until you remove the
#. Turn it on only for a folder whose file names change with every build, or players will keep an old version.
Cloudflare
When it fits: you want to upload a folder from the dashboard or the
command line, or deploy from Git, and set headers with a _headers file.
Cloudflare suggests Workers (with static assets) for new sites; Cloudflare
Pages still exists and takes a plain folder upload.
Plans: Cloudflare offers a free plan at the time of writing. Its plans, limits and terms are set by Cloudflare and can change: see Workers pricing and Pages limits.
Upload a folder (Pages): in the Cloudflare dashboard, open Workers &
Pages, create an application, choose to drag and drop your files, and drop
the folder that holds index.html and _headers. Cloudflare notes that a
project made by direct upload cannot be switched to Git later. From the
command line, npx wrangler pages deploy <folder> does the same.
From the command line (Workers static assets): put your game in a folder
named public, with _headers beside index.html, and a wrangler.jsonc
next to that folder:
{
"name": "my-game",
"compatibility_date": "2026-11-28",
"assets": { "directory": "./public" }
}
Then run npx wrangler deploy.
From Git: both Pages and Workers can build from a connected repository; connect it in the dashboard.
Headers: the _headers file above, in the folder you upload. It applies to
your static files, not to anything a Worker script sends.
The address you submit: https://<project>.pages.dev/ for Pages, or
https://<worker>.<subdomain>.workers.dev/ for Workers.
Firebase Hosting
When it fits: you already use Firebase, or you are happy to deploy from
the command line and keep the settings in firebase.json.
Plans: Firebase has a no-cost plan (Spark) at the time of writing. Its plans, limits and terms are set by Google and can change: see Firebase pricing.
From the command line: create a project in the Firebase console, put your
game in a folder named public, then run firebase init hosting (choose
public as the public directory) and firebase deploy. Running firebase init with Hosting again resets the hosting settings, so add the headers after
it.
From Git: Firebase can deploy from a GitHub repository; its Hosting documentation explains how to connect one.
Headers: in firebase.json:
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*"
],
"headers": [
{
"source": "**",
"headers": [
{
"key": "Content-Security-Policy",
"value": "frame-ancestors 'self' https://synthcade.net https://synthcade.lol https://synthcade.org https://synthcade.games"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "Referrer-Policy",
"value": "strict-origin-when-cross-origin"
}
]
},
{
"source": "**/*.html",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache"
}
]
}
]
}
}
The address you submit: https://<project-id>.web.app/ (the same site is
also at <project-id>.firebaseapp.com).
GitHub Pages
When it fits: your game's code is already on GitHub, in a public repository, and it is a plain folder of files.
Plans: GitHub Pages is included with GitHub Free at the time of writing, for public repositories. Its plans, limits and terms are set by GitHub and can change: see GitHub pricing and the GitHub Pages limits, which also say what Pages may not be used for, including running an online business. Read them if your game sells anything.
Upload a folder: create a public repository, then use Add file and
Upload files to drag in your game's files, with index.html at the top.
From Git: push the files to the repository instead. Either way, open the
repository's Settings, then Pages, and choose the branch (and folder)
to publish. If your build has folders or files starting with _, add an empty
file named .nojekyll at the top so they are served as they are.
Headers: GitHub Pages does not let you set response headers, so there is
no file to add. It does not document which headers it sends. The pages we
checked at the time of writing sent no X-Frame-Options and no
frame-ancestors, so they could be shown in our frame, but GitHub could change
that, so test your page in the embed tester. They also sent
Cache-Control: max-age=600, which you cannot change: after an update,
players may see the old version for up to ten minutes.
The address you submit: https://<user>.github.io/<repository>/.
Netlify
When it fits: you want to drag a folder onto a web page and get an address, and maybe connect Git later.
Plans: Netlify offers a free plan at the time of writing. Its plans, limits and terms are set by Netlify and can change: see Netlify pricing.
Upload a folder: drag the folder with index.html and _headers onto
Netlify Drop, or onto your team's Projects
page. From the command line, netlify deploy --prod uploads a linked site.
From Git: connect a repository from the Netlify dashboard. Every push then builds and deploys the site.
Headers: the _headers file above, in the folder you publish. Netlify
also reads the same headers from netlify.toml, if you prefer one settings
file. Headers apply to the files Netlify serves, not to functions.
The address you submit: https://<site-name>.netlify.app/.
Render
When it fits: your game is in a Git repository and you want each push to deploy it.
Plans: Render's Hobby workspace has a free tier for static sites at the time of writing, within monthly allowances. Its plans, limits and terms are set by Render and can change: see Render pricing.
From Git: in the Render Dashboard, choose New, then Static Site, connect
your repository, set the publish directory to the folder with index.html,
and deploy. Render deploys again on every push.
Headers: Render sets static site headers in the Render Dashboard rather than in a file. Add these rules to your static site:
Path: /*
Name: Content-Security-Policy
Value: frame-ancestors 'self' https://synthcade.net https://synthcade.lol https://synthcade.org https://synthcade.games
Path: /*
Name: X-Content-Type-Options
Value: nosniff
Path: /*
Name: Referrer-Policy
Value: strict-origin-when-cross-origin
Path: /
Name: Cache-Control
Value: no-cache
Path: /index.html
Name: Cache-Control
Value: no-cache
The address you submit: the onrender.com address Render gives the site,
over https.
Vercel
When it fits: you want a folder upload in the browser or one command, or
deploys from Git, with headers in vercel.json.
Plans: Vercel offers a free plan (Hobby) at the time of writing. Its plans, limits and terms are set by Vercel and can change: see Vercel pricing.
Upload a folder: drag the folder onto Vercel Drop,
or run vercel deploy in it.
From Git: import the repository in the Vercel dashboard. Each push then deploys.
Headers: in vercel.json, at the top of the folder:
{
"headers": [
{
"source": "/(.*)",
"headers": [
{
"key": "Content-Security-Policy",
"value": "frame-ancestors 'self' https://synthcade.net https://synthcade.lol https://synthcade.org https://synthcade.games"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "Referrer-Policy",
"value": "strict-origin-when-cross-origin"
}
]
},
{
"source": "/",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache"
}
]
},
{
"source": "/index.html",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache"
}
]
}
]
}
The address you submit: https://<project>.vercel.app/.
Which address to submit
Submit the address of your game's own page, the one that loads index.html,
not a page that embeds it somewhere else. Open it in a browser first: if it
ends somewhere else (a trailing /, or index.html), submit the address it
ends on. The embed tester shows whether it loads in our frame.
Using an AI coding assistant?
You can hand the setup to your own assistant. Replace <host> and give it
your game's folder:
Deploy the static game in this folder to <host>.
1. Add the response headers below for every file, in <host>'s own format
(a _headers file for Cloudflare or Netlify, firebase.json for Firebase,
vercel.json for Vercel, the dashboard for Render; GitHub Pages cannot set
headers, so skip this step there). Do not add X-Frame-Options.
Content-Security-Policy: frame-ancestors 'self' https://synthcade.net https://synthcade.lol https://synthcade.org https://synthcade.games
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
And Cache-Control: no-cache for / and /index.html.
2. Deploy it, and give me the https address of index.html.
3. Check that address: it must answer 200 over https without redirecting,
send the Content-Security-Policy above (except on GitHub Pages), and send
no X-Frame-Options header. Show me the response headers.
4. Tell me the final address to submit to Synthcade.
Want your host listed here?
If you run a host and would like it added, write to [email protected]. We list a host when its own current documentation shows both of these:
- A developer working alone can start on it without paying.
- A game served from it can load in our frame: developers can set their own
response headers (
frame-ancestorswith our addresses, and noX-Frame-Options), or the host sends no headers that block a frame.
Listing is at the team's discretion and is not an endorsement.