Skip to main content

Obtaining a domain and pointing DNS to Cloudflare

Domain and DNS changes typically take some time. I'd like to get this sorted very early on in this course, so everything is propagated and working by the time you need to make use of your domain.

Beyond just serving traffic off of the domain, we'll also use it for email configuration (MX, SPF, DKIM, and DMARC records) and to access some of your server's services directly, such as SSH and MariaDB.

Why Cloudflare

Cloudflare has one of the best and largest content delivery networks on the planet. Plenty of managed WordPress hosting providers are partnered with Cloudflare for CDN, WAF, caching and other services, claiming thousands of dollars in monthly value.

Well guess what. You can get Cloudflare for free and get the same network availability, same low global latency for DNS and web traffic, same overall performance without paying a cent.

We've been a Cloudflare customer for ages, both through service providers, as well as direct contracts. We've worked with sites and platforms on every single Cloudflare plan, including of course the multi-thousand dollar-per-month Enterprise plan, which managed hosts' marketing departments absolutely love.

There is not a single Enterprise, Business or Pro feature that is essential for a successful WordPress application. There are plenty of nice-to-haves, but none of them will really move the needle unless you are a hosting service provider.

In fact, Cloudflare for SaaS, Zero Trust Tunnels, managed challenge/captchas and some other features one could consider "enterprise", are all available on their forever free plan. Oh and did you know they're one of the most affordable domain registrars as well?

Either way, we won't be using any advanced Cloudflare features for our self-hosted WordPress application. We will be using DNS and proxying (with TLS/HTTPS) to ensure our static assets are cached and delivered quickly, and in one of the advanced modules (which are optional) we'll configure Cloudflare for page caching as well.

Can I use an existing domain?

Sure. As long as you fully understand what you're doing, you can use an existing domain. Note that the DNS changes you'll make throughout this course may impact existing services (like email) using that domain.

Can I use a subdomain?

Not recommended, but if you can juggle DNS entries correctly, go for it.

Can I use a different DNS and/or CDN provider?

Of course. However, this course assumes a Cloudflare-based setup. If you're routing your traffic directly to your server or through a different proxy, you'll have to make sure TLS/HTTPS is terminated correctly, and that communication with your server is secure.

If you're running a non-Cloudflare-based setup, you can use our Discord community for some help, advice or just rubber-ducking.

Register a domain

If you don't have a Cloudflare account yet, you can get one here.

Registering a domain through Cloudflare is a breeze, and the best part of it is that you don't get upsells for random stuff along the way. Navigate to Domain Registration - Register domains in the dashboard and find a name you like. I'm going to pick uncached.org and register it.

Cloudflare domain registration

Do provide accurate contact information for you and/or your business, and don't worry, all this information in the WHOIS database will be private if the TLD allows this, which is a standard for all Cloudflare domains.

Cloudflare domain purchase

After confirming your purchase, make sure you can navigate to the DNS management screen for your new domain, which should display the domain as Active in the top-left corner of the screen.

Cloudflare DNS management

You don't need to make any DNS changes right now, but this is the screen you'll return to after you provision your new WordPress server in a later lesson.

Existing domain

If you already own a domain and would like to bring it to Cloudflare, you can do so using the Onboard a domain button in your account home. Enter the domain and follow the on-screen instructions (select the free version!), which will allow you to import existing DNS records too.

Cloudflare update nameservers

When you're ready to move the domain, Cloudflare will provide a list of nameservers, with links to provider-specific instructions too. You'll need to update the nameservers at your domain registrar, to point to the ones provided by Cloudflare.

Note that this operation can take from a few minutes, up to a few hours, and sometimes even days depending on the TLD you're working with and your current registrar. Once everything is done, you'll see the green Active label in the top-left corner for this domain, and you can start using your domain.

Enroll
Enjoying the course content? Enroll today to keep track of your progress, access premium lessons and more.