This guide will show you how to connect a custom domain you purchased elsewhere with your service on Flightcontrol.
To connect a custom domain, you'll need to follow these high-level steps:
- Add the domain to your Flightcontrol service configuration
- Retrieve the DNS changes needed for the domain redirect in the Flightcontrol dashboard
- Apply the changes to your domain provider
The directions for adding a domain vary based on whether you are using the dashboard configuration or the
If you created your project using the Dashboard, you can add your domain to the
Custom Domain field of the associated service.
To find that field, go to the environment where your service resides, then click "Edit" and scroll to the "Services" section. When done, save the changes.
If your project is configured using
flightcontrol.json, you'll need to add the
domain configuration to your service. After you do that, push the changes to GitHub to trigger a new deployment.
After the domain information is saved, we trigger a new deployment. Once this happens, the required DNS changes will be visible in the Flightcontrol dashboard, in the environment for this service.
They will look something like this if you have added a subdomain:
⚠️ If you add a root domain, you will also see information for an ALIAS record that you need to set. An ALIAS record is a custom DNS record and it is not supported by all providers. This is one of the reasons why we do not recommend root domains.
The specific instructions will depend on whether you are setting up a root domain or a subdomain.
The DNS changes for a subdomain are the most straightforward. As you can see from the screenshot above, you'll get 2 CNAME records.
You'll need to add those records to your domain provider.
Here are some guides from different providers:
With this option, things become less straightforward.
The most important thing to be aware of is that your domain provider NEEDS to support an ALIAS record, if they don't you'll need to move the domain to one that does or fallback to the subdomain option. If they do support it, then you should be able to set it up by adding the DNS records as shown to you by Flightcontrol (see external articles above with some examples).
However, please note that that Flightcontrol can't verify if the ALIAS record was setup correctly since this record type is an internal translation and won’t appear in the nameserver response. So we only just check if CNAME is correct and assume the setup has been successful.
Lastly, if you have used Route53 as your domain provider, your domain needs to be in the same account as the service AND you'll need to configure things slightly differently. When you create the ALIAS record, instead of using the CloudFront domain, you have to choose the exact Cloudfront distribution that was created by Flightcontrol.
We have several recommendations if you are considering setting up a root domain (such as
We recommend you add a subdomain (i.e.: use
www.example.com) instead of directly referencing the root domain (
If you go with this recommendation but still want users to be able to use
example.com, please contact us and we will add a redirection for you.
If you still prefer to setup a root domain, make sure that it accepts an ALIAS DNS Record, which is a custom one not supported by all providers (Namecheap is one that does).
Besides the 2 options discussed at length, we also support wildcard domains, i.e.:
With this option you can make use of the
HOST HTTP Request Header sent to your app to see the exact domain being used and the configuration is the same as for the subdomain.
I have added the domain but still haven't made the DNS changes. Can I still access my service?
Why do you recommend using subdomain instead of root domain?