Custom Domains
The setup for a custom domain involves two steps: setting up a DNS record to point to that domain, and then deploying your application to deploy to that domain:
DNS Setup
You must first find the DNS name assigned to the load balancer of your cluster. This can be found by navigating to the Porter dashboard and copying the load balancer address:
If you’re on Digital Ocean or Google Cloud Platform, this will be an IP address — see DO/GCP section for setup. If you’re on AWS, this will be a domain name to your load balancer — see the AWS section for setup.
Digital Ocean/Google Cloud Platform
On Digital Ocean and GCP Kubernetes clusters, the load balancer address copied above will be an IP address. Thus, you can simply create an A
record for your domain/subdomain and point it to this IP address. Once DNS has propagated, you can now deploy your application using the custom domain!
nslookup <your-domain>
.Amazon Web Services
On EKS, the load balancer will be a domain name, rather than an IP address. The next steps depend on whether you are setting up a domain apex (i.e. root domain) or a subdomain:
Apex Domain
Subdomain
Because AWS creates a load balancer that is assigned a domain name, rather than an IP address, you must use a DNS provider which allows for ALIAS
records, since CNAME
records are not supported for apex domains. Create an ALIAS
record for your root domain which points to the load balancer address that you copied above.
If you’ve purchased your domain through a service like GoDaddy or Namecheap that does not support ALIAS
records, we recommend that you switch your service to Route 53: please follow this guide to manage your existing domains with Route 53, and then see the instructions below for Route 53 setup.
Route 53 Instructions
When creating a new record, leave the Record name empty and select the Alias to Network Load Balancer option. After you choose the region your EKS cluster is provisioned in, you will be able to select the URL you’ve copied from Step 2 from the dropdown menu. Set Record type as A record and create the record.
Once DNS has propagated, you can now deploy your application using the custom domain!
nslookup <your-domain>
.Deploying on the Custom Domain
To deploy an application on the domain, make sure the Expose to external traffic option is set add your domain in the Configure Custom Domain section, as follows:
That’s it! Your application should be running on your custom domain within a few minutes.