Skip to main content

Use your own domain

This guide covers the platform side and the customer side of pointing a customer's own domain (e.g. example.com) at a Multicloud-hosted site that otherwise lives at <site>.hosting.multicloud.io. The TLS cert for the customer's domain is issued automatically by Let's Encrypt with no credentials to the customer's DNS provider.

Example: a frontend and backend site on its own domain.


How it works

  Customer DNS (GoDaddy etc.)
       │
       │  www.example.com  CNAME →  example.hosting.multicloud.io
       │  example.com       (apex — see "Apex" section below)
       ▼
  example.hosting.multicloud.io  →  203.0.113.10 / 2600:…
       │
       ▼
  Traefik (worker node, hostNetwork, ports 80/443)
       │
       ├─ HTTP-01 ACME challenge (port 80, /.well-known/acme-challenge/…)
       │      └─→ cert-manager solver pod  (issues example-com-tls)
       │
       └─ Public traffic
              ├─ host: example.hosting.multicloud.io  → multicloud-tls (wildcard)
              └─ host: www.example.com                → example-com-tls (per-tenant)
                       │
                       ▼
                   frontend Service (Next.js)

The customer's DNS pointing at our cluster does double duty:

  1. Production traffic path — what serves the site.
  2. Proof of authorization to Let's Encrypt — the HTTP-01 challenge succeeds only if a request to http://<domain>/.well-known/acme-challenge/<token> reaches our cluster. That can only happen if the customer has actually pointed DNS at us. There is no allowlist file or shared secret; the manifest's Ingress declaring host: <domain> is the authorization.

If the customer un-points DNS, renewals fail and the cert eventually expires. That is the correct behavior — they have revoked our authorization.


Why two issuers?

  • Issuer/letsencrypt-prod (per-namespace, DNS-01 / Cloudflare) — issues the wildcard *.hosting.multicloud.io cert. Created by the platform in each tenant namespace, with Cloudflare API credentials we own. Required because only DNS-01 can issue wildcards.

  • ClusterIssuer/letsencrypt-http01 (cluster-wide, HTTP-01) — issues per-domain certs for tenant-owned hostnames. Defined in the cluster setup manifests and applied when the cluster is initialized. HTTP-01 uses no secrets, so a single cluster-scoped issuer is fine for all tenants.

A tenant Ingress for a customer domain references the HTTP-01 ClusterIssuer via the annotation cert-manager.io/cluster-issuer: letsencrypt-http01.


HTTP→HTTPS redirect coexistence

The Traefik web entrypoint has a permanent redirect to websecure, applied to all HTTP/80 traffic. This does not break HTTP-01:

  1. Validator hits http://<domain>/.well-known/acme-challenge/<token>.
  2. Traefik 301s to https://<domain>/.well-known/acme-challenge/<token>.
  3. Let's Encrypt validators follow HTTP→HTTPS redirects and explicitly skip TLS verification on the followed leg (RFC 8555 / Boulder behavior).
  4. Traefik on 443 has no matching cert for the new SNI yet, so it serves its default self-signed cert. The validator accepts it, follows the path to cert-manager's solver Ingress, reads the token, and validates.

No per-Ingress redirect middleware needed. The global redirect stays.


Customer-side DNS

The customer keeps their registrar (e.g. GoDaddy). They make the following changes in the DNS management UI for their domain.

1. www subdomain — straightforward

Add (or edit) a CNAME:

Type Name Value TTL
CNAME www <site>.hosting.multicloud.io 1 Hour

Replace <site> with the per-tenant slug we assigned (matches the K8s Ingress host). The CNAME inherits both A and AAAA from our hostname automatically.

2. Apex (example.com with no subdomain) — three options

GoDaddy and most registrars do not support ALIAS/ANAME/CNAME-at-apex. Pick one:

In GoDaddy → Domain Settings → Forwarding:

  • Forward to: https://www.<domain> (e.g. https://www.example.com)
  • Forward type: Permanent (301)
  • Masking: off ("Forward only" — never "Forward with masking")

Why no masking: masking iframes the destination and keeps the apex in the URL bar. Search engines treat framed content as duplicate (split ranking), deep links break, and the URL bar shows GoDaddy's cert instead of yours.

GoDaddy publishes their own apex A records pointing at their forwarding server, which 301s to www. Real content lives only at www. Propagation typically 5–30 minutes after saving.

Option B — Plain A + AAAA at the apex

Add two records at @:

Type Name Value TTL
A @ <our-ingress-IPv4> (e.g. 203.0.113.10) 1 Hour
AAAA @ <our-ingress-IPv6> (e.g. 2600:1f16:…) 1 Hour

Delete any pre-existing "Parked" A record at @.

Brittle: if our ingress IPs change (node rotation, cluster move), the customer's apex breaks until they update DNS. Use only when forwarding is unacceptable.

Option C — Switch nameservers to Cloudflare (best long-term)

Customer keeps GoDaddy as the registrar but changes nameservers (in GoDaddy: "Nameservers → Change → Custom") to Cloudflare's free DNS. Cloudflare supports CNAME-at-apex flattening:

Type Name Value
CNAME @ <site>.hosting.multicloud.io
CNAME www <site>.hosting.multicloud.io

IP changes on our side flow through transparently. ~10 min one-time setup.

CAA records

Rare, but if the customer has a CAA record on their domain restricting issuance to a CA other than Let's Encrypt, ACME issuance will refuse. Tell them to remove it or add letsencrypt.org. Most small-business domains have no CAA at all.


Platform-side manifest changes

Add the customer hostname(s) to the public Ingress only. The protected (admin) Ingress stays on <site>.hosting.multicloud.io so oauth2-proxy's redirect-URL and cookie-domain don't need to vary per host.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: <site>-public
  namespace: multicloud-hosting
  annotations:
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
    cert-manager.io/cluster-issuer: letsencrypt-http01    # ← add
spec:
  ingressClassName: traefik
  tls:
    - hosts: [<site>.hosting.multicloud.io]
      secretName: multicloud-tls
    - hosts: [www.<domain>]                               # ← add
      secretName: <site>-com-tls                          # per-tenant secret
  rules:
    - host: <site>.hosting.multicloud.io
      http:
        paths:
          - path: /
            pathType: Prefix
            backend: { service: { name: frontend, port: { number: 80 } } }
    - host: www.<domain>                                  # ← add
      http:
        paths:
          - path: /
            pathType: Prefix
            backend: { service: { name: frontend, port: { number: 80 } } }

Important: include in tls.hosts and rules only the hostnames that actually resolve to us right now. A single Certificate is one cert with multiple SANs — if any SAN's HTTP-01 challenge fails, the whole cert fails to issue. Add the apex to the manifest only after the customer has finished their apex DNS choice (Option A/B/C) and dig +short <domain> returns something.


Step-by-step playbook

For a new tenant site on a customer-owned domain:

  1. Verify port 80 is publicly reachable for <site>.hosting.multicloud.io:
    curl -sS -o /dev/null -w '%{http_code} %{remote_ip}\n' \
      http://<site>.hosting.multicloud.io/
    
    Expect 301 → https (or 200). Any connect failure means HTTP-01 cannot work.
  2. Verify the ClusterIssuer exists:
    kubectl get clusterissuer letsencrypt-http01
    
    If absent, the cluster was not initialized with the current setup. Ask Multicloud support to apply the HTTP-01 issuer manifest.
  3. Tell the customer to set DNS — the www CNAME plus their apex choice.
  4. Wait for DNS to propagate:
    dig +short www.<domain>
    dig +short <domain>            # apex, if applicable
    
    Both should resolve back to our ingress IPs.
  5. Edit the tenant manifest — add hostnames + cluster-issuer annotation + per-tenant secret as shown above. Only include hostnames that already resolve.
  6. Apply:
    kubectl apply -f <site>.yaml
    
  7. Watch the cert issue (~30–90s):
    kubectl -n multicloud-hosting get certificate <site>-com-tls -w
    kubectl -n multicloud-hosting get challenge -w
    
    Ready=True means done. No pod restarts needed; Traefik picks up the new secret automatically.
  8. Verify:
    curl -sS -o /dev/null -w 'HTTP %{http_code}\n' https://www.<domain>/
    echo | openssl s_client -connect www.<domain>:443 \
        -servername www.<domain> 2>/dev/null \
      | openssl x509 -noout -subject -issuer -dates
    
    Expect 200, subject=CN=www.<domain>, issuer=Let's Encrypt.

Troubleshooting

Challenge stuck pending for >2 minutes

kubectl -n multicloud-hosting describe challenge

Common causes:

  • DNS not yet pointing at us. dig +short <hostname> returns nothing or resolves to the registrar's parking IP. Wait or fix the customer's DNS.
  • CAA record blocks Let's Encrypt. Look for CAA record prevents issuance in the challenge events. Customer must edit/remove the CAA record on their domain.
  • Port 80 blocked between Let's Encrypt and our ingress. Validate with curl -v http://<hostname>/.well-known/acme-challenge/test-from-anywhere from outside the cluster.

Certificate False, error Connection refused

Means the LE validator could not reach our cluster on port 80. Re-verify curl http://<site>.hosting.multicloud.io/ works from a public network. If that already 301s, the issue is the customer-domain DNS, not us.

Multiple SANs, only one is broken

You will see Failed to wait for order resource … status=invalid and the whole cert stays Ready=False. Remove the broken hostname from the manifest, re-apply, let the cert issue with the working hostnames, then add the broken one back once its DNS is fixed. A single Certificate is all-or-nothing.

Apex never resolves after GoDaddy forwarding

GoDaddy's "Domain Forwarding" UI sometimes coexists with a leftover Parked A record. Open DNS Management and confirm @ shows GoDaddy's forwarding IP, not their parking IP. May also need 30 min for TTL on the old parked record.

Cert renewed but Traefik still serves the old one

Should not happen — Traefik watches Secrets and reloads on change. If it does, kubectl rollout restart -n kube-system daemonset/traefik (or deployment/traefik depending on chart config) forces a reload.


Limits and caveats

  • Let's Encrypt rate limits: 50 certs per registered domain per week, and 300 new orders per account per 3 hours. Each customer's apex is its own registered domain, so the per-domain limit rarely matters; the per-account limit matters during onboarding bursts.
  • No wildcards via HTTP-01. If a tenant ever needs *.<their-domain>, they must use DNS-01 with us holding their DNS credentials, or move to Cloudflare and use Cloudflare-issued certs at the edge.
  • First HTTPS hit before cert exists fails. cert-manager issues asynchronously; the cert is usually ready before any real user hits the site. Don't advertise the new hostname to the customer until step 8 above passes.
  • Apex on IPv6-only would fail with IPv4-only customers. Our ingress is dual-stack, so this is not an issue — recorded for posterity if that ever changes.