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
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
 
Understanding the CloudFlare Setup
In this setup, CloudFlare acts as a secure middleman between your domain registrar and the 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
Create a Free CloudFlare Account
CloudFlare provides free DNS management, SSL/TLS certificates, and CDN services.
- 1
Go to cloudflare.com and click Sign Up
 - 2
Create your account with email and password
 - 3
Verify your email address
 - 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)
 
Add Your Domain to CloudFlare
CloudFlare will automatically import your existing DNS settings from your current host.
- 1
Click "Add a Site" in your CloudFlare dashboard
 - 2
Enter your domain name (e.g.,
yourdomain.com) - 3
Select the Free Plan
 - 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
Click Continue
 
Important:
Double-check all DNS entries were imported correctly. Missing records could break email, subdomains, or other services.
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:
Steps to update nameservers:
- 1. Log into your domain registrar (GoDaddy, Namecheap, Google Domains, etc.)
 - 2. Find the DNS or Nameserver settings for your domain
 - 3. Replace the existing nameservers with CloudFlare's nameservers
 - 4. Save the changes
 - 5. Wait for propagation (can take a few minutes to 48 hours)
 
❌ Old Nameservers (Remove)
✓ New Nameservers (Add)
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.
Find Your Flux Application Domain
Before adding the CNAME record, you need to know your Flux app's domain name.
- 1
Go to home.runonflux.io
 - 2
Navigate to Applications → Management
 - 3
Click on your deployed application
 - 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).
Add CNAME Record in CloudFlare
Now configure the CNAME record to point your custom domain to your Flux app.
CNAME Record Configuration:
Or use @ for root domain
Your Flux application domain
Detailed Steps:
- 1. In CloudFlare dashboard, click on your domain
 - 2. Navigate to DNS in the left sidebar
 - 3. Click Add Record
 - 4. Fill in the fields as shown above
 - 5. Important: Make sure the Proxy toggle is ON (orange cloud icon)
 - 6. Click Save
 
✓ Subdomain Example
app✓ Root Domain Example
@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!
Configure SSL/TLS Settings (Optional)
Optimize your SSL/TLS settings for better security and compatibility.
- 1
In CloudFlare dashboard, go to SSL/TLS
 - 2
Set encryption mode to Full (recommended)
This encrypts traffic between CloudFlare and Flux
 - 3
Enable Always Use HTTPS under Edge Certificates
Automatically redirects HTTP to HTTPS
 - 4
Enable Automatic HTTPS Rewrites
Fixes mixed content warnings
 
| SSL Mode | Description | Recommended | 
|---|---|---|
| Off | No encryption - not recommended | ❌ | 
| Flexible | Encrypts browser → CloudFlare only | ⚠️ | 
| Full | Encrypts browser → CloudFlare → Flux | ✓ | 
| Full (Strict) | Full + validates Flux certificate | ✓ | 
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:
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):
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.com→Your existing website (GoDaddy, Wix, etc.)app.yourdomain.com→Your Flux dAppapp, Target: yourapp-abc123.app.runonflux.ioExample 2: Root Domain for Flux App
yourdomain.com→Your Flux dApp@, Target: yourapp-abc123.app.runonflux.ioExample 3: Multiple Subdomains for Multi-Component App
app.yourdomain.com→Frontend componentapi.yourdomain.com→API componentTroubleshooting
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