HTML5 Game Iframe Checklist
Portals do not copy your files — they load your game inside an iframe. A game that runs perfectly on your own page can still show a blank box, ignore the keyboard or stay silent once it is embedded. These ten checks cover what we see most often when reviewing submissions, and they apply to every portal, not only ours.
Serve the game over HTTPS
Portals are served over HTTPS, and browsers block an http:// game inside an https:// page as mixed content. Every file the game loads has to be HTTPS too: scripts, images, audio, fonts and API calls.
Allow the game to be framed
If your server sends X-Frame-Options: DENY or SAMEORIGIN, or a Content-Security-Policy with frame-ancestors 'self', the game shows a blank box on every other site. Remove X-Frame-Options and either drop frame-ancestors or list the portals you allow. This is the most common reason a good game cannot be published.
Give a direct link to the build
A portal needs the URL that opens the game itself, usually an index.html, not a store page or a landing page with a Play button. On itch.io that is the embed URL of the HTML build; on Newgrounds it is the embed link.
Use relative paths
Load assets with relative paths (assets/sprite.png), not absolute ones (/assets/sprite.png). Absolute paths break as soon as the build sits in a subfolder or behind a CDN.
Scale to the frame, not to the screen
Size the canvas from window.innerWidth and innerHeight and listen for resize. Do not read screen.width: inside an iframe the screen is not your space. Keep the aspect ratio and letterbox rather than stretch.
Take keyboard focus on click
An iframe does not receive key presses until the player clicks inside it. Show a "Click to play" overlay, and call preventDefault on arrow keys and space so the page behind the game does not scroll while someone plays.
Start audio after the first tap
Browsers block sound until the user interacts with the frame. Create or resume your AudioContext on the first click or touch, and do not make loading wait for audio that cannot play yet.
Do not depend on storage
In a third-party iframe, localStorage and cookies can be partitioned or blocked. Wrap every read and write in try/catch and let the game run without a save instead of crashing on the first line.
Pause when the player leaves
Listen for visibilitychange and blur, then pause the loop and mute the sound. A game that keeps playing music in a background tab gets closed, and portals reject it.
No pop-ups, redirects or forced logins
Do not open new windows, do not navigate the top page (window.top.location), and do not put the game behind a sign-in. Links to your own site are fine when the player chooses to click them.
Test it yourself in one minute
Save this as a local HTML file, put your own link in it, and open it in a browser. If the game loads, takes keyboard input after a click and plays sound, it will work on a portal.
<iframe src="https://your-site.com/your-game/index.html"
width="960" height="600"
allow="fullscreen; autoplay; gamepad"
allowfullscreen></iframe>
A blank frame usually means point 1 or 2. Open the browser console: it names the header that blocked the frame.
Ready?
To compare other places to publish, see where to publish your HTML5 game, or go to everything for developers.
Passes all ten? A real person will play it within two days.
Submit your game