Custom Domains
Custom domains allow you to route one or more domains to a Service.
Defining Custom Domains
services:
simpleweb:
domain: myapp.example.org
# ... other services ...
complexweb:
domain: subdomain1.example.org,subdomain2.example.org,somethingelse.test.com
Multiple domains should be comma separated. Wildcard domains (e.g., *.example.org) are supported when using DNS-01 validation with a pre-generated wildcard certificate. To use a wildcard domain:
- Configure DNS-01 validation (currently available for AWS Route53).
- Generate the wildcard certificate with
convox certs generate "*.example.org" --issuer letsencrypt. - Reference the certificate ID in your
convox.ymlusing thecertificateattribute (see SSL).
Wildcard domains are not supported with the default HTTP-01 automatic certificate flow.
Dynamic Configuration
You can avoid hardcoding your custom domains in convox.yml using
Environment Interpolation.
services:
web:
domain: ${HOST}
$ convox env set HOST=myapp.example.org,myapp2.example.org
Configuring DNS
You will need to alias your custom domain to your Rack's router endpoint. You can find this with convox rack:
$ convox rack
Name convox
Provider gcp
Router router.0a1b2c3d4e5f.convox.cloud
Status running
Version 3.23.4
In this example you would set up the following DNS entry:
myapp.example.org CNAME router.0a1b2c3d4e5f.convox.cloud
See Also
- SSL for configuring SSL certificates for your domains
- Load Balancers for advanced load balancer configuration