How routing works.

The exact, step-by-step logic behind every request to username.myjay.net.

The short version

A separate piece of infrastructure, independent from the main myjay.net site, handles every request to every subdomain. It looks up the username, checks whether that account is published, and if so, serves the matching file straight from storage. Nothing is rebuilt or regenerated, it reads exactly what you uploaded.

Step by step

  1. The hostname is split on dots. A request needs at least three parts (username.myjay.net) to be treated as a subdomain request at all. The bare apex domain isn't handled by this part of the platform.
  2. The first part of the hostname is taken as the username, and looked up. If no account has that username, or the account exists but hasn't published, the visitor gets a friendly "nothing here yet" page with a 404 status. The site existing and the site being published are two different checks, both have to pass.
  3. The request path is resolved against your files:
    • If the path is empty (the bare domain) or ends in a slash, it looks for index.html at that location. A request to /blog/ looks for blog/index.html.
    • Otherwise it looks for a file at that exact path first. A request to /style.css looks for exactly style.css.
    • If there's no exact match and the path has no file extension, it tries one more thing: that path plus /index.html. So /blog (no trailing slash) also resolves to blog/index.html if that file exists, even though you didn't upload anything literally named blog.
  4. If none of that finds a file, the visitor gets a styled 404 page specific to your subdomain.
  5. If a file is found, it's streamed back with a Content-Type header matched to its extension (or whatever type was recorded when you uploaded it), and cached at the edge for a short time (currently 60 seconds) to keep repeat requests fast.

Case sensitivity

File paths are matched exactly, including case. About.html and about.html are two different files as far as routing is concerned. If a link or a 404 seems wrong, check capitalization first, see troubleshooting.

Folders

There's no special folder configuration needed. Upload blog/index.html and blog/post-1.html, and both /blog/ and /blog will correctly serve blog/index.html by the rule above, while /blog/post-1.html serves that file directly.

What counts as a page view

Only successful responses with an HTML content type increment your view count, see analytics for the full breakdown. Requests for CSS, JS, images, fonts, and 404s don't count.