Skip to main content

Custom Domains

Every web service gets a free subdomain at service-name.railpush.com. You can also add custom domains with automatic TLS provisioning.

Setup​

  1. Add your domain in the service's Networking tab
  2. Point your DNS CNAME record to your service's .railpush.com subdomain
  3. TLS certificate is provisioned automatically via Let's Encrypt

Domain Redirects​

You can configure a domain to 301-redirect all traffic to another domain. This is commonly used to redirect an apex domain to www (or vice versa).

API: Add redirect domain
POST /services/:id/custom-domains
{
"domain": "example.com",
"redirect_target": "www.example.com"
}
// All requests to example.com will 301-redirect to https://www.example.com
// TLS is provisioned for both domains automatically.

DNS Configuration​

  • CNAME Point subdomains (www, app, api) to your service's .railpush.com hostname
  • A Record Point apex/root domains to the ingress IP shown in the Networking tab (apex domains cannot use CNAME)

Blueprint Domains​

railpush.yaml
services:
- type: web
name: my-app
runtime: node
domains:
- myapp.com
- www.myapp.com