1. Home
  2. Flux Cloud
  3. Application Managment
  4. How to add a Custom Domain to your Flux Cloud Deployment

How to add a Custom Domain to your Flux Cloud Deployment

You can point a custom domain of your choice such as yourdapp.com to your Flux Cloud Dapp via a Flux Domain Name (FDN) – yourdapp.app.runonflux.io. It is recommended to use CloudFlare; and you only need to add a CNAME record.

Cloudflare Config

Note: In the example use case, CloudFlare’s role is to act as a middleman between the domain name company (E.G: godaddy.com) and the Flux Cloud network, securely forwarding traffic to the Flux Cloud Dapp.

  1. If you haven’t already, create a free account at CloudFlare: https://cloudflare.com
  2. You’ll be asked to ‘Add a Site’, so enter your domain name and CloudFlare will automatically pull your DNS settings from your current Host to CloudFlare. Double check all DNS entries have been pulled across.
  3. After you’ve added a site, you’ll be issued nameservers by CloudFlare to change over at your Domain Name Registrar:

    • E.G: nick.ns.cloudflare.com and tina.ns.cloudflare.com
    • They replace your existing name servers: E.G: ns1.yourdomain.com
  4. Once the settings have taken effect, anywhere from a few minutes to a few hours, your custom domain name will be passed through CloudFlares system forwarding to your original host.
  5. The final step is to add a CNAME record for the Flux Domain Name to CloudFlare.
  6. Click on DNS, Add Record and complete the fields like this:

    • Type: CNAME
    • Name: Your App Name (yourapp.yourdomain.com) or if you want to use the root domain name enter just enter @
    • Target: Your Flux Domain Name
    • Proxy: Make sure this is checked
  • In this example setup as shown in the Screenshot, the root domain is still being hosted on another third party server (E.G: godaddy.com), and just the subdomain is being forwarded to Flux.
  • yourdomain.com >> CloudFlare >> Godaddy (Existing Website)
  • yourapp.yourdomain.com >> CloudFlare >> Flux Dapp (yourdapp.app.runonflux.io)
Updated on November 22, 2023

Related Articles