Use your own domain
Point example.com at an instance. CloudNx terminates HTTPS at the edge with a certificate issued on the first request, forwards plain HTTP to your instance, and keeps the certificate renewed. Ten minutes, most of it waiting for DNS.
Before you start
- An instance that answers HTTP on port 80 (nginx, Caddy, a Node app — anything).
- Access to the DNS for the domain (Cloudflare, GoDaddy, BigRock, Route 53, wherever it lives).
1. Add the domain to the instance
Open the instance in the portal, scroll to Networking → Domains, and add the hostname exactly as users will type it: www.example.com, api.example.com, or the bare example.com. Add each hostname separately — example.com and www.example.com are two entries.
Or with the API:
curl -X POST https://cloudnx.in/api/v1/compute/instances/$INSTANCE_ID/domains \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"hostname": "www.example.com"}'2. Point DNS at CloudNx
The portal shows the record to create. It is one of two shapes:
| Hostname | Record | Value |
|---|---|---|
www.example.com, api.example.com (a subdomain) | CNAME | your instance’s free URL, e.g. vm-a1b2c3d4.in-mum.cloudnx.in |
example.com (the bare domain) | A | the region’s public address, shown in the portal |
Prefer the CNAME wherever your DNS provider allows it — if the instance moves, the CNAME follows it and you change nothing. Most providers only allow an A record at the bare domain.
Cloudflare users: set the record to DNS only (grey cloud), not proxied, at least until the certificate is issued. A proxied record never reaches CloudNx directly, so the certificate challenge cannot complete.
3. Wait for verification — it is automatic
CloudNx checks DNS every few minutes. When the record resolves to us the domain flips to Active and you get an email. Nothing to click. DNS propagation is usually under ten minutes; some providers take longer on a freshly changed record.
4. Open it
Visit https://www.example.com. The first request takes a second or two while the certificate is issued; every request after that is instant. You never see the certificate, and you never renew it.
Choosing the canonical hostname
If both example.com and www.example.com point at the same instance, mark one as Primary in the portal. The other redirects to it with a 301, so search engines index one address. Pick the one your users already use.
Where HTTPS ends
TLS terminates at the CloudNx edge in the instance’s region. Traffic to your instance is plain HTTP on port 80 over the private network — your app does not need a certificate and should not try to redirect HTTP to HTTPS itself (the edge already did). If your app must know the original scheme, read the X-Forwarded-Proto header.
Want to terminate TLS yourself instead — your own certificate, your own nginx? Publish port 443 (see Publish a port) and point the A record at that. Then the certificate is yours to manage.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Stays Pending for over an hour | DNS does not resolve to CloudNx yet | dig +short www.example.com from your laptop. If it is not our address or your free URL, the record is wrong or still propagating. |
| Certificate error in the browser | Cloudflare proxy on, or the domain was opened before it turned Active | Grey-cloud the record; wait for Active; reload. |
| 502 Bad Gateway | Domain is Active but nothing listens on port 80 inside the instance | curl -I http://localhost on the instance. Start your web server. |
| Redirect loop | Your app redirects HTTP→HTTPS itself | Disable that; the edge already serves HTTPS. Check X-Forwarded-Proto instead. |
Limits
- Wildcards (
*.example.com) are not supported yet — add each hostname. - No charge. Custom domains and their certificates are included with every instance.