Hostnames and certificates
On this page
A zone serves on hostnames of your own, each a CNAME to cdn.cachegenie.com, plus a certificate we issue once that CNAME is live. In that order: point the DNS first, then switch SSL on, and the certificate arrives within a minute or two. Every hostname has a certificate of its own, from Let's Encrypt, or one you upload. A zone with no hostname serves nothing.
The name#
A hostname is a full name of at least two labels, at most 253 characters, made of letters, digits and hyphens with a last label of letters only. A subdomain such as cdn.example.com is recommended; a root domain such as example.com is accepted once you confirm it (see Root and apex domains below). No wildcard, no underscore, no port and no IP address. Our own cachegenie.com and every name under it are refused, and so is a name already on a zone, yours or anyone else's. It is added with SSL off. Deleting a hostname, the zone's last one included, removes it and its certificates at once, and every location stops answering for it within a minute.
The DNS#
A CNAME from your hostname to cdn.cachegenie.com, the same for every zone, which the zone page shows as CNAME target:
cdn.example.com. CNAME cdn.cachegenie.com.That is the whole of it: the hostname tells us which zone it belongs to. cdn.cachegenie.com resolves to our network and follows it as it changes, so never copy our addresses into A or AAAA records of your own: they change without notice, and a name that stops resolving to us stops being served. The CNAME also brings our HTTPS record (alpn="h3,h2"), which tells a browser that reads it to use HTTP/3 from its first request; there is nothing to add on your side, and an HTTPS record of your own cannot sit beside a CNAME. A root domain such as example.com cannot carry a CNAME record: see Root and apex domains below.
Root and apex domains#
A subdomain such as www.example.com or cdn.example.com is the recommended hostname. A root (apex) domain such as example.com or example.co.uk can be added too, with a trade-off: in New hostname the NOC says it is a root domain, and the hostname is added once you tick Use the root domain anyway. Through the API, send ACCEPT_APEX 1 beside it.
Under DNS standards (RFC 1034), the root apex of a domain cannot carry a CNAME record because it must also hold SOA and NS records, which cannot coexist with a CNAME. When DNS providers offer support for apex CNAMEs using ALIAS, ANAME or CNAME flattening, their authoritative nameservers resolve the CNAME target recursively on your behalf and return synthetic A records to the visitor. A root domain on a zone needs one of those, an ALIAS or ANAME record, or a CNAME your provider flattens, pointing at cdn.cachegenie.com.
Because CacheGenie's GeoDNS sends each visitor to the nearest edge location, an ALIAS record or CNAME flattening bypasses it, so visitors may be served from a location further from them:
- Requests arrive from the DNS provider, not the visitor. Our GeoDNS nameservers see the IP address of the DNS provider's recursive resolver rather than the visitor's local DNS resolver or ISP. If the DNS provider resolves the name from a server in another country or continent, our GeoDNS routes traffic to edge locations near that server instead of near the visitor.
- Client subnet information is discarded. Most DNS providers do not forward the EDNS Client Subnet (ECS, RFC 7871) when performing internal CNAME flattening queries, preventing our GeoDNS from detecting the visitor's true geographic location.
- Global cache collapsing. Many DNS providers cache the flattened A records across their global network, serving the first resolved edge address to all visitors worldwide regardless of their location.
A subdomain is still the better choice where you can use one:
Add the www subdomain (such as www.example.com) as a custom hostname on your CDN zone, with a standard CNAME record pointing to cdn.cachegenie.com. Then, configure an HTTP 301 redirect on your apex domain (using your DNS provider's redirect rules or your web server) forwarding all visitors from example.com to https://www.example.com. This keeps every visitor on their nearest edge location. If you need the root domain itself on CacheGenie, add it and accept the warning: it will work, but its DNS may send some visitors to a location further away.
SSL and Force SSL#
Once the name resolves to us, switch SSL on. We check that the name's DNS resolves to our network, order a certificate from Let's Encrypt, and every location is serving it within about fifteen seconds of its issue; the whole thing takes a minute or two, and the certificate renews itself 30 days before it expires. If the name does not resolve to us yet, the Certificate column reads waiting for DNS to point here and the name is checked again an hour later; switching SSL off and on does not bring that forward, which is why the DNS goes first.
Until a certificate exists, an HTTPS connection to the hostname fails at the handshake: no certificate is presented, so a browser shows a connection or protocol error rather than a page. HTTP works throughout. Switching SSL off stops HTTPS for the name and turns Force SSL off with it.
Force SSL becomes available once SSL is on and a certificate exists. On, a request over HTTP is answered with a 301 to the same URL over HTTPS, path and query included, and every response that carries your content adds Strict-Transport-Security: max-age=31536000, without includeSubDomains. That header tells browsers to use HTTPS for this hostname for a year without asking, so switch it on only when everything served under the name works over HTTPS.
Moving a hostname that is already live#
There is a gap between the moment your DNS starts sending visitors to us and the moment the certificate exists: a minute or two in which HTTPS on that name fails. HTTP is unaffected. Two ways to handle it:
- Upload your own certificate first. Add the hostname, use the certificate button on its row (Use your own certificate) to upload the certificate and key your current server uses, then move the DNS: HTTPS works from the first visitor. The gap moves to the moment you press Remove certificate, which deletes the upload at once while Let's Encrypt takes a minute or two to issue, so do that at a quiet moment, or keep your own certificate and renew it yourself.
- Accept the gap. Move the DNS at a quiet moment with a short TTL in place, and switch SSL on the moment the name resolves to us. Visitors who arrive over HTTPS in that minute or two see a connection error and can retry.
What the Certificate column says#
| The column reads | Meaning | What to do |
|---|---|---|
| Let's Encrypt | A certificate is in place and renewing itself. The same bare text shows while the SSL switch is off, so read the switch with it | Nothing |
| Let's Encrypt, being issued | SSL was switched on and the order is in progress | Wait a minute or two |
| Let's Encrypt, waiting for DNS to point here | The name did not resolve to us when it was last checked. The tooltip says what it resolved to instead | Fix the CNAME. The name is checked again an hour later, and the line clears once a certificate has been issued |
| Let's Encrypt, issuance failed, retrying | Let's Encrypt refused the order or could not validate it. The tooltip carries the reason | The usual causes are a CAA record on your domain that does not allow letsencrypt.org, and DNS that changed during the order. It is retried after an hour, then 2, 4 and 8, then every 16 hours |
| Let's Encrypt, renewal failed, retrying | The same, for a renewal. The current certificate keeps serving until it expires | As above |
| Let's Encrypt, expired, reissuing | The certificate expired before a renewal succeeded and a new one is being ordered | Check the tooltip for what stopped the renewal |
| Own certificate (issuer), expires 3 Mar 2027 | You uploaded a certificate. Inside 30 days of expiry the line reads expires in N days as a warning, and once it has expired, expired 3 Mar 2027 | Replace it, or remove it to hand over to Let's Encrypt |
| certificate status unavailable, please refresh | The page could not read the certificate's state | Refresh the page |
Your own certificate#
Use your own certificate, the certificate button on any hostname's row (Replace once one is uploaded), takes the certificate and its private key in PEM form. What is accepted:
- The certificate first, followed by any intermediate certificates, each as a
-----BEGIN CERTIFICATE-----block. The chain is stored as pasted. - An unencrypted private key: RSA of 2048 bits or longer, or EC on P-256, P-384 or P-521 with a named curve. A key with a passphrase, or an EC key exported with explicit curve parameters, is refused with a message saying so.
- A certificate issued for the hostname, by its common name or a subject alternative name. A wildcard covers one label, so
*.example.comcoverscdn.example.comand nota.b.example.com. - One that has not expired, and does not start more than a day in the future.
Saving switches the hostname's SSL on, replaces any certificate uploaded before, and puts the new one on every location within about fifteen seconds. Remove certificate, the button beside it, deletes it at once, switches Force SSL off, and starts a Let's Encrypt issuance for the name, which takes a minute or two, so HTTPS on the name fails in between. The key is stored with the zone and sent only to our edge. We email everyone ticked for Technical emails under the account's Email contacts 30 days and 7 days before an uploaded certificate expires, and again when it has expired; an expired upload is taken over by Let's Encrypt automatically, so a lapsed one costs an HTTPS outage for as long as the issuance takes rather than for good.
Several hostnames on one zone#
A zone can carry as many hostnames as you need, each with its own certificate. Whether they share one cached copy of each file or hold one copy per name depends on the Forward host header switch: off, one folder of files is served under every name from one copy; on, each name is cached separately, because your origin is told which name was asked for and may answer differently. A website that answers each name differently needs it on; a library of files under several names wants it off. A purge clears every hostname's copy either way.
If it does not work#
- HTTPS to the hostname fails to connect: the SSL switch is off for it (the Certificate column still reads Let's Encrypt), the name does not resolve to us yet (waiting for DNS to point here), or the certificate is still being issued (being issued).
- A page saying No site is configured here: the name resolves to us but is not on any zone, or the zone it was on has been deleted.
- The name does not reach us: check the CNAME with
dig cdn.example.com CNAME; it should answercdn.cachegenie.com.
Error pages and status codes covers everything a visitor can be shown.