Custom Domains & SSL Certificates

Configure your own domain name with automatic SSL/TLS encryption for your Flux deployments using CloudFlare

Why Use a Custom Domain?

Professional Branding

Use yourapp.com instead of appname.app.runonflux.io

Free SSL/TLS

Automatic HTTPS encryption via CloudFlare

CDN & Security

CloudFlare provides caching, DDoS protection, and more

What You'll Learn

    Set up CloudFlare for your domain
    Configure CNAME records to point to your Flux app
    Enable automatic SSL/TLS encryption
    Use subdomains or root domains with Flux

Before You Start

  • ✓ A domain name (from GoDaddy, Namecheap, Google Domains, etc.)
  • ✓ A deployed Flux application with its Flux domain name
  • ✓ Access to your domain registrar's control panel
  • ✓ Completed the Basic Deployment tutorial
1

Understanding the CloudFlare Setup

In this setup, CloudFlare acts as a secure middleman between your domain registrar and the Flux network:

User visits:yourapp.yourdomain.com
DNS lookup via:CloudFlare
Forwards to:yourapp-abc123.app.runonflux.io
Served by:Flux Network

Root Domain

yourdomain.com

Can point to your existing website on another host (GoDaddy, etc.)

Subdomain

app.yourdomain.com

Points to your Flux dApp via CloudFlare CNAME

2

Create a Free CloudFlare Account

CloudFlare provides free DNS management, SSL/TLS certificates, and CDN services.

  1. 1

    Go to cloudflare.com and click Sign Up

  2. 2

    Create your account with email and password

  3. 3

    Verify your email address

  4. 4

    Select the Free Plan (perfect for most Flux apps)

CloudFlare Free Plan Includes:

  • • Unlimited DNS queries
  • • Free SSL/TLS certificates (automatic HTTPS)
  • • Basic DDoS protection
  • • Global CDN for faster loading
  • • Web Application Firewall (WAF)
3

Add Your Domain to CloudFlare

CloudFlare will automatically import your existing DNS settings from your current host.

  1. 1

    Click "Add a Site" in your CloudFlare dashboard

  2. 2

    Enter your domain name (e.g., yourdomain.com)

  3. 3

    Select the Free Plan

  4. 4

    CloudFlare will scan and import your existing DNS records

    Review all imported records to ensure they're correct (A records, MX records, etc.)

  5. 5

    Click Continue

Important:

Double-check all DNS entries were imported correctly. Missing records could break email, subdomains, or other services.

4

Update Nameservers at Your Domain Registrar

CloudFlare will provide you with custom nameservers that you need to set at your domain registrar.

CloudFlare will assign nameservers like:

nick.ns.cloudflare.com
tina.ns.cloudflare.com

Steps to update nameservers:

  1. 1. Log into your domain registrar (GoDaddy, Namecheap, Google Domains, etc.)
  2. 2. Find the DNS or Nameserver settings for your domain
  3. 3. Replace the existing nameservers with CloudFlare's nameservers
  4. 4. Save the changes
  5. 5. Wait for propagation (can take a few minutes to 48 hours)
❌ Old Nameservers (Remove)
ns1.yourdomain.com
ns2.yourdomain.com
✓ New Nameservers (Add)
nick.ns.cloudflare.com
tina.ns.cloudflare.com

Propagation time: DNS changes can take anywhere from a few minutes to 48 hours to fully propagate worldwide. CloudFlare will notify you when your domain is active.

5

Find Your Flux Application Domain

Before adding the CNAME record, you need to know your Flux app's domain name.

  1. 1
  2. 2

    Navigate to ApplicationsManagement

  3. 3

    Click on your deployed application

  4. 4

    Copy the Flux domain name - it will look like:

    yourapp-componentname-abc123.app.runonflux.io

Multi-component apps: Each component gets its own domain. Choose the component you want to expose to your custom domain (usually the frontend).

6

Add CNAME Record in CloudFlare

Now configure the CNAME record to point your custom domain to your Flux app.

CNAME Record Configuration:

CNAME
app

Or use @ for root domain

Auto
yourapp-abc123.app.runonflux.io

Your Flux application domain

Detailed Steps:

  1. 1. In CloudFlare dashboard, click on your domain
  2. 2. Navigate to DNS in the left sidebar
  3. 3. Click Add Record
  4. 4. Fill in the fields as shown above
  5. 5. Important: Make sure the Proxy toggle is ON (orange cloud icon)
  6. 6. Click Save
✓ Subdomain Example
Name: app
Result: app.yourdomain.com
✓ Root Domain Example
Name: @
Result: yourdomain.com

Automatic SSL/TLS:

With the proxy enabled (orange cloud), CloudFlare automatically provides a free SSL/TLS certificate. Your site will be accessible via https:// with no additional setup!

7

Configure SSL/TLS Settings (Optional)

Optimize your SSL/TLS settings for better security and compatibility.

  1. 1

    In CloudFlare dashboard, go to SSL/TLS

  2. 2

    Set encryption mode to Full (recommended)

    This encrypts traffic between CloudFlare and Flux

  3. 3

    Enable Always Use HTTPS under Edge Certificates

    Automatically redirects HTTP to HTTPS

  4. 4

    Enable Automatic HTTPS Rewrites

    Fixes mixed content warnings

SSL ModeDescriptionRecommended
OffNo encryption - not recommended
FlexibleEncrypts browser → CloudFlare only⚠️
FullEncrypts browser → CloudFlare → Flux
Full (Strict)Full + validates Flux certificate
8

Test Your Custom Domain

Verify everything is working correctly:

1. DNS Propagation Check

Use online tools to verify DNS has propagated:

2. Visit Your Custom Domain

Open your browser and navigate to:

https://app.yourdomain.com

3. Verify SSL Certificate

Check for the padlock icon in your browser's address bar. Click it to view:

  • • Certificate should be issued by CloudFlare
  • • Connection should show as "Secure"
  • • No mixed content warnings

4. Test HTTPS Redirect

Try accessing via HTTP (should auto-redirect to HTTPS):

http://app.yourdomain.com → https://app.yourdomain.com

Success!

Your Flux application is now accessible via your custom domain with automatic SSL/TLS encryption!

Common Configuration Examples

Example 1: Subdomain for Flux App, Root for Existing Site

yourdomain.comYour existing website (GoDaddy, Wix, etc.)
app.yourdomain.comYour Flux dApp
CNAME Record: Name: app, Target: yourapp-abc123.app.runonflux.io

Example 2: Root Domain for Flux App

yourdomain.comYour Flux dApp
CNAME Record: Name: @, Target: yourapp-abc123.app.runonflux.io

Example 3: Multiple Subdomains for Multi-Component App

app.yourdomain.comFrontend component
api.yourdomain.comAPI component
Multiple CNAME Records: One for each component you want to expose

Troubleshooting

Domain doesn't resolve / "Site not found"

Possible causes:

  • • DNS hasn't propagated yet (wait up to 48 hours)
  • • Nameservers not updated at domain registrar
  • • CNAME record not saved or incorrect
  • • Typo in Flux domain name

SSL certificate warnings / "Not secure"

Solutions:

  • • Ensure proxy status is ON (orange cloud) in CloudFlare
  • • Set SSL/TLS mode to "Full" or "Full (Strict)"
  • • Enable "Always Use HTTPS"
  • • Clear browser cache and try again

Redirect loop / Too many redirects

Change SSL/TLS encryption mode from "Flexible" to "Full" in CloudFlare settings.

Some pages work, others don't

Enable "Automatic HTTPS Rewrites" in CloudFlare SSL/TLS Edge Certificates to fix mixed content issues.

Best Practices

✓ Do

  • ✓ Always use HTTPS (enable "Always Use HTTPS")
  • ✓ Enable CloudFlare proxy (orange cloud) for DDoS protection
  • ✓ Use Full SSL mode for end-to-end encryption
  • ✓ Set up page rules for caching and performance
  • ✓ Monitor CloudFlare Analytics for traffic insights

✗ Don't

  • ✗ Don't disable CloudFlare proxy unless necessary
  • ✗ Don't use "Flexible" SSL mode with Flux
  • ✗ Don't forget to test after DNS changes
  • ✗ Don't expose sensitive endpoints without WAF rules
  • ✗ Don't skip SSL/TLS configuration review