Skip to Content
InstaHost

Content serving

Hosts, relative URLs, headers, compression and Unity WebGL.

Content serving

URLs

  • Files: https://files.instahost.cloud/<id>/<file name> (the name percent-encoded), and https://files.instahost.cloud/<id>. Any other name, and /<id>/, is 404.
  • Sites: https://<id>.instahost.cloud/ serves index.html; every file is at its path below that. A directory path without its slash redirects (308) to the path with it when the directory has an index.html. In path mode, /<id> redirects to /<id>/. Redirects keep the query string.
  • In subdomain mode, /.well-known/acme-challenge/ and /.well-known/pki-validation/ 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.
  • There is no SPA fallback, no clean URLs (/about is not about.html), and a site's own 404.html, redirects or header files are not used.
  • /robots.txt at the root of the files host (and of the sites host in path mode) allows everything; indexing is controlled per artifact by X-Robots-Tag. In subdomain mode, a site's robots.txt is its own file.

Relative URLs in sites

Build sites with relative URLs: css/site.css, not /css/site.css. With Vite, set base: "./". In path mode a site lives under /<id>/, so root-absolute URLs and <base href="/"> point outside it and break; the CLI scans HTML and CSS and warns (root_absolute_reference). This service runs in subdomain mode.

Answers

StatusWhen
200 / 206The file (206 for a satisfiable single range).
304If-None-Match matches the ETag.
308Directory or bare-id redirect (sites).
401Private file without a valid access token (WWW-Authenticate: Bearer). Nothing about the file is revealed, on GET, HEAD, ranges and conditional requests alike.
403A service-worker script request (with the Service-Worker header). Service workers are refused on both content hosts, because one could outlive expiry and takedown.
404Unknown, 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 /.well-known/.
405Any method but GET and HEAD (Allow: GET, HEAD), including OPTIONS.
410Expired, deleted or blocked. Checked before the access token.
412If-Match does not match the ETag.
416Unsatisfiable range; Content-Range: bytes */<size>.
429The host's per-client rate limit; Retry-After: 60.

Errors are short text/plain bodies with Cache-Control: no-store, X-Robots-Tag: noindex, nofollow and Content-Security-Policy: default-src 'none'.

Headers

HeaderFiles hostSites
Content-TypeFrom the extension, or the declared content_type; text types with charset=utf-8; unknown: application/octet-streamFrom the extension (see precompressed files below)
Content-Dispositioninline for images (PNG, JPEG, GIF, WebP, AVIF, BMP, ICO, SVG), audio, video, plain text, Markdown, CSV, JSON and PDF; attachment for everything else, including HTML, XHTML, XML, JavaScript and CSS. Always with the file name.none
Content-Security-Policysandbox; default-src 'none'; img-src 'self' data:; media-src 'self'; style-src 'unsafe-inline' on every file except PDF, which Chrome's viewer cannot show under sandbox. Scripts in uploaded HTML or SVG never run.none: sites run their own scripts
Cache-Controlprivate, no-cache, no-transform; private files no-store, no-transform. no-transform keeps the edge from changing what you uploaded: no injected analytics script, no rewritten HTML, no edge compression (upload .br or .gz files for compression).
ETagStrong, "<id>-<index>"; artifacts are immutable.
Accept-Ranges: bytesyesexcept precompressed files
X-Robots-Tagnoindex, nofollow unless the artifact is public
Referrer-Policyno-referrersame-origin in subdomain mode; no-referrer in path mode
Cross-Origin-Resource-Policycross-origin; private files same-originnone
Access-Control-Allow-Origin* on successful (200 and 206) responses for public and unlisted files onlynone
X-Content-Type-Options: nosniffon every response, errors and redirects included
Strict-Transport-Securitymax-age=31536000; includeSubDomains on every response
Origin-Agent-Clusternone?1 on every response

CORS on the files host is success-only. A page on another site can fetch() 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 OPTIONS 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, bytes=a- or bytes=-n; an end beyond the file is clamped. Several ranges, a malformed value or a Range 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.
  • If-None-Match (weak comparison, * allowed) gives 304; If-Match (strong) gives 412 on a mismatch; If-Range with another validator gets the whole file.
  • private, no-cache plus the ETag makes browsers revalidate on every use, so an expired or deleted artifact stops loading at once, even from cache.

Precompressed files (sites)

A site file whose name ends in .br or .gz after one of the extensions js, mjs, wasm, data, json, css, html, htm, svg, txt, xml, map, bundle or mem is served as the inner type with Content-Encoding: br or gzip, byte for byte as uploaded, and is never ranged. So app.js.br is text/javascript; charset=utf-8 with Content-Encoding: br, and build.wasm.gz is application/wasm with gzip. Following the Unity Manual, .data, .symbols.json, .bundle and .mem payloads are application/gzip when gzip-encoded and application/octet-stream when Brotli-encoded. Other .gz and .br files (backup.tar.gz) and .unityweb are ordinary downloads without Content-Encoding. On the files host, .gz and .br 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 index.html) with publish. 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 Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy.