Getting your ideal domain name purchase and pointed at your hosting provider is a tricky process. The good news is, you only have to get it right once!
We’re going to take a few extra steps for future maintainability, readiness for CDN, caching & SSL.
Things you’ll need before working through this article:
- An account with a hosting provider.
- Either a domain name, or your credit card and some domain name ideas ready to go.
- Meet eligibility if buying certain types of domains (UK requirements, Australia requirements)
- This is a good time to read up on password management. Never use the same password twice!
Purchase your domain name
You can pick up a domain name anywhere. We use namecheap, but there’s also GoDaddy, CrazyDomains, and a hundred more.
The price rarely differs by more than $2-3 per year, and the service offerings are very similar.
A .com domain that’s any good is very hard to come by, so prepare to be disappointed or get creative.
If there’s an option to enable domain privacy, do it! I made the mistake once of buying a domain and switching it off, and I still receive emails offering cheap off-shore hosting, web design, logo design, and welcome mats.
Set up your DNS Hosting
Your DNS host tells the browser where to find the server it’s looking for. It says “mail.mydomain.com” is served by gmail, “support.mydomain.com” is served by ZenDesk, and “www.mydomain.com” is served by wpengine. It can point a web address to another web address, to an IP address, and a few other useful things.
In the old days, we used our domain name registrar (e.g. Namecheap, above) for our DNS Hosting too. They usually charge for it, and offer half-baked functionality.
We use CloudFlare for this now. Out of the box, CloudFlare comes with security monitoring, SSL, aggressive caching, DDOS protection, and automatic CDN.
Create an account with CloudFlare and add the domain you purchased above. CloudFlare will scan the domain and add it so you’re nearly ready to go.
You need to point your domain name (held at the domain registrar above) to CloudFlare now, so CloudFlare can route your customers where they need to go. This is ‘changing the nameservers’.
Change the nameservers
So, CloudFlare knows all about our domain. Our domain registrar doesn’t know we’re using CloudFlare yet, so we have to tell them! The instructions below assume you’ve purchased your domain through namecheap, but other registrars will be similar.
Sign in, and visit your domain list. Click “Manage” on the right, under “Nameservers” choose “Custom DNS”. Enter the name servers as below to route all traffic to CloudFlare.
Great. Sign out of Namecheap and back to CloudFlare.
Send the traffic where it needs to go
Warning! Up to this point, your domain will still be working fine. The instructions below to delete DNS entries could make your existing site stop working.
Back in CloudFlare, we’ve got some configuration to do now. Different addresses need to be handled by different servers, and this is where we need to configure it all.
In CloudFlare, visit the “DNS” tab.
If there’s an existing ‘www’ entry in the table, delete it. If there’s an A record, delete it.
Create a new CNAME record to catch requests to “[mysite].com” and send them to WPEngine. Click “Add Record”.
Create another CNAME record to catch requests to “www.[mysite].com” and send them to WPEngine. Click “Add Record”.
Great. Requests for your site are going to WPEngine now (We need to tell WPEngine to expect them though! We’ll do that in a minute)
OK, you’ve got an account set up with google apps, right? OK if not, follow this first!
We need to tell CloudFlare that your emails are handled by google. You need to add 5 separate servers for this, so it’ll take a few minutes.
For each of the 5 servers and priorities in the table below, carry out the steps.
|MX server address||Priority|
Create a new DNS entry,
Select “MX” for type of record, and enter your domain name in the second box. Click the third to configure further.
Click “Add Record” to save your entry. Remember, you need to do this for each of the 5 servers above.
Great, email is set up.