- Hobby plan → 2 custom-domain “slots” per service.
- Each hostname you add (
www.example.com
,admin.example.com
, …) counts as one slot.
Can you just CNAME a sub-domain to <app>.up.railway.app ? |
Yes, but… |
---|---|
Works for HTTP/HTTPS routing. | Railway won’t issue/renew TLS for that name because it’s unaware of it. |
Good for quick tests. | You must supply SSL (e.g. Cloudflare) yourself. |
Use a wildcard.
- Delete existing hostnames in Settings ▸ Domains (free your slots).
- Add a single wildcard:
*.yourdomain.com
- Create the DNS records Railway shows:
*.yourdomain.com CNAME <value>.up.railway.app
_acme-challenge.yourdomain.com CNAME authorize.railwaydns.net
- (Optional) use the 2nd slot for the root domain
yourdomain.com
.
Result → every sub-domain (www
, admin
, api
, …) reaches the same service over HTTPS, all within the free limit.
-
Keep the wildcard setup above (costs 1 slot).
-
In your DNS zone, add explicit records that override the wildcard:
four.yourdomain.com A <static-IP> docs.yourdomain.com CNAME docs.example.net