Linking your domain with Cloudflare: DNS and SSL settings
Published Updated
The advised way to link your own domain to your brand is through your own Cloudflare account, with the proxy on. You need the domain in your Cloudflare account and access to your brand in the portal. Then it is two DNS records, one tick in the portal and a few Cloudflare settings.
Point your domain at your brand
Most sites run on the bare domain, yourdomain.com, with www.yourdomain.com sending visitors to it. That is the example throughout: two CNAME records, both pointing at the same target. A subdomain such as join.yourdomain.com works the same way, with one record.
yourdomain.com is an example. Type your own domain and subdomain wherever you see them, in Cloudflare and in the portal, never the example itself. - In your Cloudflare account, open your domain, then DNS › Records.
- Press Add record.
- Set the record Type to CNAME (3).
- In Name, enter
@, which means your bare domain (4). Cloudflare allows a CNAME here by flattening it, which is normal. - In Target, enter
dns-proxy.hubpeople.ai(5). - Make sure the Proxy setting is enabled, the orange cloud showing Proxied (6).
- Save the record.
- Add a second record the same way, with Name
www, the same target and the proxy on.
@ (4), the HubPeople target (5) and the proxy on (6). The www record is the same with the name www.Linking a members area domain
If you also want your members area on the same domain as your landing pages, add one more CNAME record, again with the proxy on. The target depends on your brand's business type:
| Brand type | Name, for example | CNAME target |
|---|---|---|
| Mainstream | members | affinity.thehubpeople.com |
| Adult | members | excite.thehubpeople.com |
Add the domain in the portal
Cloudflare now sends your visitors to us. The portal also needs to know the domain is yours, and that Cloudflare looks after its certificate. Open your brand's Domain Linking tab (1) and press Add Domain (2).
Step 1 of the dialog is about buying a domain. If you already have one, press Next.
Step 2: tick Use Cloudflare Proxy
Tick Use Cloudflare Proxy (1). The target it shows changes to dns-proxy.hubpeople.ai (2), the one you used above. The table (3) is only examples: you have already created the record you need, so press Next.
Step 3: enter your domain
Type your own domain into Your app domain (1), exactly as in your DNS record, for example yourdomain.com. You only need the bare domain here: the www rule below sends www visitors on to it. Example Entries (2) are samples, not values to copy. Leave Update the Brand Label (3) ticked if you want your brand's label in the portal to match this domain, then press Submit (4). Add each domain this way, one at a time.
Back on the Domain Linking tab, the domain shows Using Cloudflare Proxy, and its SSL status shows as skipped, because Cloudflare holds the certificate.
SSL settings
Three settings under SSL/TLS in Cloudflare's left-hand menu make sure your site serves securely.
1. Encryption mode: Full (strict)
On SSL/TLS › Overview (1), the encryption mode should read Full (strict) (2). If it shows anything else, press Configure (3) and choose Full (strict). Cloudflare's automatic mode, if it is on, usually picks this for you.
Full (strict) encrypts both hops, from your visitor to Cloudflare and from Cloudflare to us, and checks our certificate. Avoid Flexible, which new zones sometimes start on: it leaves the hop from Cloudflare to us unencrypted.
2. Always Use HTTPS: on
Under SSL/TLS › Edge Certificates, make sure Always Use HTTPS is switched on, so every plain http request is sent on to https.
3. Minimum TLS Version: 1.2
On the same Edge Certificates page, set Minimum TLS Version to TLS 1.2.
Caching: respect existing headers
Under Caching › Configuration, change Browser Cache TTL from its default to Respect Existing Headers.
Browsers then keep your pages and files for our 6 minutes, so changes you make in the portal reach your visitors within minutes. Left on Cloudflare's default, browsers keep files such as your stylesheet and fonts for 4 hours, and a purge in Cloudflare will not help, because a purge never reaches browsers.
The www redirect rule
Your www record sends visitors to Cloudflare. To move them on to the bare domain, apply the rule template Redirect from WWW to Root under Rules › Overview. Anyone typing www. then lands on the clean address, and search engines see one site. If your site is on a subdomain instead, skip this.
Quick checklist
| Where | Setting |
|---|---|
| Cloudflare, DNS Records | CNAME @ and CNAME www, both to dns-proxy.hubpeople.ai, Proxied |
| Cloudflare, DNS Records (members area) | CNAME to affinity.thehubpeople.com (mainstream) or excite.thehubpeople.com (adult), Proxied |
| Portal, Domain Linking | Add Domain for yourdomain.com, with Use Cloudflare Proxy ticked |
| SSL/TLS › Overview | Encryption mode Full (strict) |
| SSL/TLS › Edge Certificates | Always Use HTTPS on, Minimum TLS 1.2 |
| Caching › Configuration | Browser Cache TTL: Respect Existing Headers |
| Rules › Overview | Template Redirect from WWW to Root (skip it on a subdomain) |