Every web project gets its own address on hcode.site when you create it. It works over HTTPS straight away, needs no DNS records from you, and stays on the project's Domains page next to any custom domains you add.
How the address is chosen
The address is your project name turned into a hostname, followed by .hcode.site:
- letters are lowercased, and every run of characters other than
a–z,0–9and hyphens becomes one hyphen (accented letters included) - hyphens at the start and end are dropped
- the result is cut to 48 characters
A project named "My Shop API" gets my-shop-api.hcode.site. If another project already uses that name, HCode adds a hyphen and four random characters, for example my-shop-api-3f9a.hcode.site.
The address is fixed when the project is created. Renaming the project later does not change it.
Where you see it
The generated address is labelled "Generated" and starts out as the project's primary domain. It has no DNS record to set up and no Remove button.
While a new address is being connected, its badge reads "Setting up" with the note "We're setting up your app's address. This usually takes a few minutes." Once it works, the hostname turns into a link you can open.
Its certificate is handled at HCode's edge, so there is no certificate to wait for. See HTTPS certificates.
Background workers
A background worker doesn't serve web traffic, so it gets no generated address. Its Domains page says "This is a background worker, so it has no web address. Check the logs to see what it's doing."
Turning a web app into a worker removes its generated address, and HCode refuses the change while the project still has custom domains. See Web apps and workers.
When the app isn't running
If the project is stopped, failed or suspended, visitors to the generated address get a short HCode page instead of an error:
| Project | Page heading |
|---|---|
| Stopped | "This app is stopped" |
| Starting | "This app is starting" (the page reloads itself every 10 seconds) |
| Failed, with no working version | "This app isn't running" |
| Suspended, or its organisation is blocked for billing | "This app is unavailable" |
These pages answer with HTTP status 503. Custom domains never get them, because HCode doesn't put its own page on a domain that belongs to you. See Start, stop and restart.
Names you can't add
Hostnames on hcode.site belong to the platform, so adding one as a custom domain (for example shop.hcode.site) is refused. To serve your app on a name of your own, add a custom domain.