Content serving
Hosts, relative URLs, headers, compression and Unity WebGL.
Content serving
URLs
- Files:
(the name percent-encoded), andhttps://files.instahost.cloud /<id>/<file name> . Any other name, andhttps://files.instahost.cloud /<id> , is 404./<id>/ - Sites:
serveshttps://<id>.instahost.cloud/ ; every file is at its path below that. A directory path without its slash redirects (index.html ) to the path with it when the directory has an308 . In path mode,index.html redirects to/<id> . Redirects keep the query string./<id>/ - In subdomain mode,
and/.well-known/acme-challenge/ always answer 404 on a site's host, even if the site contains such files: otherwise a site could pass a certificate authority's domain validation for its own host name./.well-known/pki-validation/ - There is no SPA fallback, no clean URLs (
is not/about ), and a site's ownabout.html , redirects or header files are not used.404.html at the root of the files host (and of the sites host in path mode) allows everything; indexing is controlled per artifact by/robots.txt . In subdomain mode, a site'sX-Robots-Tag is its own file.robots.txt
Relative URLs in sites
Build sites with relative URLs: , not . With Vite, set . In path mode a site lives under , so root-absolute URLs and point outside it and break; the CLI scans HTML and CSS and warns (). This service runs in
Answers
| Status | When |
|---|---|
| 200 / 206 | The file (206 for a satisfiable single range). |
| 304 | matches the ETag. |
| 308 | Directory or bare-id redirect (sites). |
| 401 | Private file without a valid access token (). Nothing about the file is revealed, on , , ranges and conditional requests alike. |
| 403 | A service-worker script request (with the header). Service workers are refused on both content hosts, because one could outlive expiry and takedown. |
| 404 | Unknown, pending or failed artifact, a file that is not in it, an artifact on the wrong host (a file id on the sites host, or the other way round), or, in subdomain mode, a certificate-validation path under . |
| 405 | Any method but and (), including . |
| 410 | Expired, deleted or blocked. Checked before the access token. |
| 412 | does not match the ETag. |
| 416 | Unsatisfiable range; . |
| 429 | The host's per-client rate limit; . |
Errors are short bodies with , and .
Headers
| Header | Files host | Sites |
|---|---|---|
| From the extension, or the declared ; text types with ; unknown: | From the extension (see precompressed files below) |
| for images (PNG, JPEG, GIF, WebP, AVIF, BMP, ICO, SVG), audio, video, plain text, Markdown, CSV, JSON and PDF; for everything else, including HTML, XHTML, XML, JavaScript and CSS. Always with the file name. | none |
| on every file except PDF, which Chrome's viewer cannot show under . Scripts in uploaded HTML or SVG never run. | none: sites run their own scripts |
| ; private files . keeps the edge from changing what you uploaded: no injected analytics script, no rewritten HTML, no edge compression (upload or files for compression). | |
| Strong, ; artifacts are immutable. | |
| yes | except precompressed files |
| unless the artifact is | |
| | in subdomain mode; in path mode |
| ; private files | none |
| on successful (200 and 206) responses for public and unlisted files only | none |
| on every response, errors and redirects included | |
| on every response | |
| none | on every response |
CORS on the files host is success-only. A page on another site can a public or unlisted file and read it. It cannot read error responses (404, 410, …) cross-origin, and requests that need a preflight fail, because is 405. Private files and sites send no CORS headers. No content host ever sets a cookie.
Ranges and conditional requests
- One range per request:
,bytes=a-b orbytes=a- ; an end beyond the file is clamped. Several ranges, a malformed value or abytes=-n header over 200 characters get the whole file (200). A start at or beyond the end is 416; a suffix range on an empty file is 200.Range (weak comparison,If-None-Match allowed) gives 304;* (strong) gives 412 on a mismatch;If-Match with another validator gets the whole file.If-Range plus the ETag makes browsers revalidate on every use, so an expired or deleted artifact stops loading at once, even from cache.private, no-cache
Precompressed files (sites)
A site file whose name ends in or after one of the extensions , , , , , , , , , , , , or is served as the inner type with or , byte for byte as uploaded, and is never ranged. So is with , and is with . Following the Unity Manual, , , and payloads are when gzip-encoded and when Brotli-encoded. Other and files () and are ordinary downloads without . On the files host, and files are always ordinary downloads.
Unity WebGL
Tested with Unity 2022.3.14f1 (WebGL 2, Brotli) on 2026-11-22 (deployed at instahost.dev (site on its own content host); headless Chrome 158.0.8127.36 (1 SwiftShader via ANGLE (design default)); Chrome received .data.br as br, .js.br as br, .wasm.br as br): the build loads and renders in Chrome with no decoding or MIME errors. Unity 6, gzip-compressed and multithreaded builds are not claimed.
Publish the build folder (the one with ) with . Brotli builds need no server configuration: the precompressed rules above serve them. gzip builds are served by the same rules but have not been tested. Multithreaded builds do not run, because sites are not served with and .