Domains & launch

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.

Use your own domain. 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.
  1. In your Cloudflare account, open your domain, then DNS › Records.
  2. Press Add record.
  3. Set the record Type to CNAME (3).
  4. In Name, enter @, which means your bare domain (4). Cloudflare allows a CNAME here by flattening it, which is normal.
  5. In Target, enter dns-proxy.hubpeople.ai (5).
  6. Make sure the Proxy setting is enabled, the orange cloud showing Proxied (6).
  7. Save the record.
  8. Add a second record the same way, with Name www, the same target and the proxy on.
Cloudflare's Add record dialog. Markers show the type CNAME (3), the name @ for the bare domain (4), the target dns-proxy.hubpeople.ai (5), and Proxy status switched on, showing Proxied (6).
The record for your bare domain: CNAME (3), name @ (4), the HubPeople target (5) and the proxy on (6). The www record is the same with the name www.
Propagation takes time. A new DNS record can take up to 24 hours to reach everywhere, though it is usually much quicker. Do not worry if the domain does not load straight away.

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 typeName, for exampleCNAME target
Mainstreammembersaffinity.thehubpeople.com
Adultmembersexcite.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).

The portal's Domain Linking tab. Markers show the Domain Linking tab (1), the Add Domain button (2), and the brand's temporary address (3).
Domain Linking (1) and Add Domain (2). Until a domain is linked, your brand serves on its temporary address (3).

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 2 of the Add Domain dialog with Use Cloudflare Proxy ticked (1), the target dns-proxy.hubpeople.ai (2), and a table of example records marked as examples only (3).
Use Cloudflare Proxy ticked (1). The records in the table are examples only (3).

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.

Step 3 of the Add Domain dialog. Markers show the Your app domain field (1), the Example Entries panel, examples only (2), the Update the Brand Label checkbox (3), and the Submit button (4).
Your own domain goes in Your app domain (1). Example Entries (2) are examples only.

Back on the Domain Linking tab, the domain shows Using Cloudflare Proxy, and its SSL status shows as skipped, because Cloudflare holds the certificate.

Do not skip the tick. Without it, the portal tries to issue a certificate of its own and the domain will not load properly. The dialog's other options, such as redirecting extra domains to your main one, are in Linking your domain in the portal.

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.

Cloudflare's SSL/TLS Overview. Markers show Overview under SSL/TLS in the menu (1), the current encryption mode reading Full (strict) (2), and the Configure button (3).
SSL/TLS Overview (1): the encryption mode reads Full (strict) (2). Configure (3) changes it.

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.

Cloudflare's Always Use HTTPS setting with the toggle switched on.
Always Use HTTPS switched on.

3. Minimum TLS Version: 1.2

On the same Edge Certificates page, set Minimum TLS Version to TLS 1.2.

Cloudflare's Minimum TLS Version dropdown open, with TLS 1.2 among the options.
Choose TLS 1.2 as the minimum version.

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.

Cloudflare's Browser Cache TTL setting with the dropdown open and Respect Existing Headers selected.
Browser Cache TTL set to Respect Existing Headers.
Want files kept longer, for faster repeat visits? Deep dive: Caching with your own Cloudflare explains how to keep versioned files for longer, and what that asks of you.

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.

Cloudflare's Rules Overview page with the rule templates grid. Arrows point to the Rules Overview menu item and the Redirect from WWW to Root template.
Apply the Redirect from WWW to Root template from the Rules Overview.
Rules is also where redirects live. The same Rules area can hold your own redirect rules at the Cloudflare edge. For when that is the right tool versus the portal's built-in Redirect Rules, see the comparison in the deep dive.

Quick checklist

WhereSetting
Cloudflare, DNS RecordsCNAME @ 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 LinkingAdd Domain for yourdomain.com, with Use Cloudflare Proxy ticked
SSL/TLS › OverviewEncryption mode Full (strict)
SSL/TLS › Edge CertificatesAlways Use HTTPS on, Minimum TLS 1.2
Caching › ConfigurationBrowser Cache TTL: Respect Existing Headers
Rules › OverviewTemplate Redirect from WWW to Root (skip it on a subdomain)