Using your own domain name
To use a custom domain, you will need to configure your DNS records and your Anvil app. Anvil will take care of the SSL certificate, so you do not need to purchase your own SSL or TLS certificate.
Configuring your Anvil app
First, switch an environment to a custom domain:
Configuring the DNS records
Next, create a DNS A
record pointing your domain to 52.56.203.177
. If you wish to use a subdomain of the domain you purchased (such as app.mydomain.com
), you can simply configure an A
record pointing that subdomain
to the IP address above. To configure a subdomain, just enter the subdomain in place of the @
symbol when configuring the A
record.
If you want to use www.mydomain.com
as well as mydomain.com
, you can configure a second A
record for www
. In this case, configuring your app to use mydomain.com
will cause both www.mydomain.com
and mydomain.com
to work for your app.
AAAA
records for your domain, as these will prevent us from issuing a certificate for your domain.Help and tips
Here are some tips on using a custom domain for some common domain registrars:
Google Domains
Google Domains refers to the record you need to create as a ‘Custom Resource Record’.
Google Domains and Synthetic Records
GoDaddy
In the GoDaddy DNS Management page for your domain, you can create an A
record in the ‘Records’ card:
Cloudflare
In Cloudflare’s DNS settings tab, add an A
record in the ‘add record’ tool.
Cloudflare and SSL
The cloud icon next to the ‘add’ button toggles Cloudflare’s CDN and other features on or off. Anvil apps will work with either setting. If you’re using Cloudflare’s SSL support, you need change the SSL Support setting from ‘Flexible’ to ‘Full Strict’. See this article from Cloudflare for more info. It will take a few minutes to take effect.
TLS/SSL Certificates
SSL certificates for hosted apps are managed by Anvil. There will be a delay between setting up your custom domain and the certificates being registered.
Do you still have questions?
Our Community Forum is full of helpful information and Anvil experts.