Running your container on a random subdomain works for development, but production needs a real domain. Here's how to connect api.yourcompany.com to your Docker container with automatic HTTPS.
Why Custom Domains Matter
A custom domain provides:
-
Brand consistency —
app.yourcompany.cominstead ofrandom-slug.platform.dev - Better SEO — Search engines prefer stable, branded URLs
- Trust signals — HTTPS on your own domain looks professional
- Easier integrations — Webhooks and APIs expect stable endpoints
The Traditional Way (Pain)
Setting up a custom domain for containers usually means:
- Configure an ingress controller or load balancer
- Set up DNS records
- Generate SSL certificates manually (or configure cert-manager)
- Handle certificate renewals
- Debug TLS issues when things break
That's a lot of infrastructure work for "point domain at container."
The Simple Way
With SnapDeploy, the process is:
- Add your domain in the dashboard
- Create one DNS record
- Wait 5-10 minutes
That's it. SSL certificate is automatic.
Step-by-Step Guide
Step 1: Get the IP Address
In your SnapDeploy dashboard, go to:
Container Settings → Custom Domains → Add Domain
Enter your domain (e.g., api.example.com) and you'll get an IP address like 52.XX.XX.XX.
Step 2: Create the DNS Record
At your DNS provider, add an A record:
| Field | Value |
|---|---|
| Type | A |
| Name |
api (or @ for root domain) |
| Value | The IP from Step 1 |
| TTL | Auto or 300 |
Step 3: Wait for DNS Propagation
Usually 5-30 minutes. The dashboard shows verification status in real-time.
Step 4: SSL Is Automatic
Once DNS is verified, SnapDeploy provisions a Let's Encrypt certificate automatically.
- ✅ No manual uploads
- ✅ No renewal configuration
- ✅ No downtime
Your container is now available at https://api.example.com.
Why A Records Instead of CNAME?
Most platforms require CNAME records, which creates problems:
CNAMEs don't work on root domains (
example.com)
You need "CNAME flattening" which not all DNS providers support. More complexity for no real benefit.
SnapDeploy uses A records, which work everywhere for both root domains and subdomains.
DNS Provider Quick Reference
Cloudflare
Type: A
Name: @ or subdomain
Value: SnapDeploy IP
Proxy: Either works (if proxied, set SSL to "Full")
Namecheap
Domain List → Advanced DNS → Add A Record
Use @ for root domain
Route 53
Create A record (not alias)
No need for ACM certificates or load balancers
Plan Limits
| Plan | Custom Domains |
|---|---|
| Free | 0 |
| Hobby | 0 |
| Starter | 2 |
| Pro | 5 |
| Business | Unlimited |
Troubleshooting
Domain not verifying?
- DNS propagation might still be in progress
- Check the A record points to the correct IP
- Remove conflicting records
SSL not active?
- Wait a few more minutes after DNS verification
- Don't switch DNS records during provisioning
Mixed content warnings?
- Update hardcoded
http://URLs tohttps:// - Check environment variables
Conclusion
Custom domains shouldn't require infrastructure expertise. Point your DNS, get HTTPS, ship your app.
What DNS provider are you using? Drop a comment below!
Top comments (0)