How to Add Custom Domains to Nife Apps | Step-by-Step Guide
Map your custom domain to applications and static sites in a few simple steps.
Before You Start#
What you need:
- Registered domain name (e.g., myapp.com)
- Domain registrar account access
- Ability to modify DNS records
- The domain must be registered before adding
Where to register:
- GoDaddy
- Namecheap
- Bluehost
- AWS Route 53
- CloudFlare
- Any domain registrar
Step 1: Choose Resource Type#
Add Domain to Application#
For deployed web applications:
- Go to Domains page
- Click Map Custom Domain
- Select Application
- Choose app from dropdown
Requirements:
- Application must be deployed
- Application must have external port
- Must have active status
Add Domain to Static Site#
For deployed static sites:
- Go to Domains page
- Click Map Custom Domain
- Select Static Site
- Choose site from dropdown
Requirements:
- Site must be deployed
- Site must be active
- S3 bucket must be configured
Step 2: Enter Domain Name#
Domain Name Format#
Enter your custom domain:
Full Domain:
Subdomains Allowed:
Valid Format:
- Lowercase letters (a-z)
- Numbers (0-9)
- Hyphens (-)
- Dots for subdomains
Invalid Format:
- Uppercase letters
- Spaces
- Special characters (except hyphen and dot)
- Bare domain without TLD
Domain Requirements#
Valid Domain:
- โ Registered with registrar
- โ Active and not expired
- โ You own or control it
- โ 1-63 characters per label
Invalid Domain:
- โ Not registered
- โ Expired
- โ Belongs to someone else
- โ Invalid characters
Step 3: Review Connection Details#
Before confirming, you'll see:
Connection Information:
What this means:
- Your domain will point to Nife infrastructure
- CNAME record redirects traffic
- Automatic SSL certificate will be provisioned
- Domain will be active within 5-30 minutes
Step 4: Update DNS Records#
Understanding DNS#
DNS (Domain Name System) translates domain names to IP addresses.
DNS Records:
- CNAME: Points domain to another domain (recommended)
- A Record: Points domain to IP address
- ALIAS: Special record type (some registrars)
Access Your Registrar#
- Log into your domain registrar
- Find DNS settings (may be called "Nameservers," "Records," "DNS Management")
- Look for DNS or Advanced options
Common Registrars:
- GoDaddy: GoDaddy.com โ Domain Control Panel
- Namecheap: Namecheap.com โ Manage Domain
- Bluehost: Bluehost.com โ cPanel
- AWS Route 53: AWS Console โ Route 53
Add CNAME Record#
For most domains, add a CNAME record:
- In your registrar, find DNS/Records section
- Click Add Record or Add CNAME
- Fill in:
- Name:
api(subdomain part only) - Type:
CNAME - Value:
app.elb.nifetency.com(from Nife) - TTL: 3600 (or default)
- Name:
Example for api.myapp.com:
Example for www.myapp.com:
Add A Record (Alternative)#
If CNAME not available:
Step 5: Verify Configuration#
Wait for DNS Propagation#
DNS changes take time to propagate:
Timeline:
- Immediate: Changes saved at registrar
- 5 minutes: Most ISPs see change
- 1 hour: Most providers updated
- 24-48 hours: Complete propagation
Test Your Domain#
Before propagation completes:
- Check DNS record saved in registrar
- Use online DNS checker
- Wait 5-15 minutes before testing
After propagation:
- Open your domain in browser
- Should show your application
- Check for lock icon (HTTPS)
- SSL certificate should be valid
Verify in Nife#
- Go back to Domains
- Find your domain in list
- Status should show "Active"
- SSL column shows "Secured"
Troubleshooting#
Problem: Domain Not Working#
Symptoms:
- Domain shows error page
- "Site not found" message
- DNS lookup fails
Solutions:
Verify DNS record:
- Go back to registrar
- Check CNAME value is exactly correct
- Remove any extra spaces
- Check TTL setting
Wait for propagation:
- DNS takes up to 24 hours
- Check status with:
nslookup myapp.com - Use online DNS checker tool
Check domain spelling:
- Verify domain name is correct
- Check for typos
- Confirm registrar shows active
SSL certificate:
- May take 5-10 minutes to provision
- Check in Nife dashboard
- Certificate should show "Valid"
Problem: HTTPS Not Working#
Symptoms:
- Page loads but no lock icon
- SSL error in browser
- Certificate error
Solutions:
- Wait for SSL provisioning (5-10 minutes)
- Refresh browser (hard refresh: Ctrl+F5)
- Clear browser cache
- Check certificate status in Nife
Problem: Old Domain Still Works#
Symptoms:
- Old domain still resolves
- Both old and new work
- Confused which to use
Solutions:
- Old domain will continue working
- Can use either domain
- Consider setting up redirects
- Update links to new domain
Problem: Email Not Working#
Symptoms:
- Email stopped working
- Cannot send emails
- Email bounces
Solutions:
- CNAME record doesn't affect email
- Keep separate MX records for email
- Don't replace MX records
- DNS should have both CNAME and MX
DNS Record Examples#
Gmail Custom Domain#
Forwarding Email#
Subdomain#
Best Practices#
1. Double-Check Values#
- Copy CNAME value exactly from Nife
- No extra spaces
- Correct capitalization
- Remove old records if present
2. Use Descriptive Names#
For subdomains, use clear names:
- โ
wwwfor main domain - โ
apifor API endpoint - โ
blogfor blog section - โ
app1,test,temp
3. Set Appropriate TTL#
- Lower TTL (300): More frequent updates, slower to propagate
- Higher TTL (3600): Less frequent updates, faster propagation
- Default (3600): Usually fine for most cases
4. Keep Email Working#
- Don't replace MX records
- Keep both CNAME and MX records
- MX for email, CNAME for web traffic
- Test email after DNS changes
5. Monitor After Setup#
- Verify domain works
- Check HTTPS works
- Monitor for errors
- Keep DNS records documented
6. Update Links#
- Update bookmarks to new domain
- Update documentation
- Update social media links
- Update any hardcoded URLs
Multiple Domains#
Same App, Multiple Domains#
Add multiple domains to same application:
Each domain needs:
- Separate CNAME record
- Same target (same app)
- Separate SSL certificate (auto-provisioned)
- Added through Domains interface
Subdomains vs Root Domain#
Root domain (example.com):
Subdomain (www.example.com):
Next Steps#
- DNS Configuration - Detailed DNS setup
- SSL Certificates - Certificate management
- Monitoring Domains - Track domain usage
Support#
Issues adding a domain?
- Check troubleshooting section above
- Verify DNS records in registrar
- Wait for DNS propagation
- Contact support: [email protected]