Moving Your DNS
By now you already have a domain registered. If you registered your domain with Cloudflare in the previous guide, then your DNS will already be setup in Cloudflare and you can skip this page and go back to the main guide.
What is DNS? Well, you don’t really need to know this, but it might help if you understand what it is. When you register your domain, it is registered with a domain registrar. The only job of a domain registrar is to reserve the domain for you. DNS stands for Domain Naming System and every domain has a bunch of records associated with it. These records tell the world where your website is hosted, where your email should be delivered to and a few other things.
Most domain registrars also provide DNS management as part of their service. Domain registrars, like GoDaddy, Namecheap, 123-reg etc. have control panels that look different. For us to provide a consistent experience and be able to help you, we need to move this DNS to somewhere familiar. It also has a couple of massive benefits for your website, which we will mention later. For now, let’s get started with moving your DNS across.
- The first step is to add your domain in Cloudflare. To do this, from the main dashboard, click on ‘Websites’ in the left window pane.
- In the right pane, click on the ‘Add Website’ button
3. Enter the name of your domain into the box and click on ‘Add Site’
4. On the next page you will be asked to choose one of the plans. Choose the ‘Free’ plan at the bottom and click ‘Continue’
5. On the next page, Cloudflare will scan your domain and try to detect the existing DNS records. If you have an existing website, you should expect to see an ‘A’ type record or a ‘CNAME’ type record. An A record will point to an address on the internet which will be where your current website lives. A CNAME record points to another name. In the example below, the website is hosted on a server with the address 18.104.22.168. There is also a CNAME for ‘www’ so that if someone puts a ‘www’ in front of the domain it will go to the same place as the A record.
If you have an email address setup that uses your domain name, then you should expect to see an MX record like below. This is the record that tells the world where email for your domain should be delivered.
All of this is only relevant if you have an existing website and / or email for your domain setup. In that case, you would want to see these records appear. If anything is missed in the scan, you can click on the ‘Add record’ button to include it.
6. If you are happy with the records, click on the little orange slider to turn off the ‘Proxy status’. This is a feature that protects and speeds up websites, but we don’t want to do this for your website just yet. Click on the ‘Continue’ button when you are done.
6. On the next page, you will be provided with instructions for changing the ‘name servers’ for your domain. To do this, you would log into your domain registrar. This could be GoDaddy, Namecheap, 123-reg or any number of different domain registrars. Go to the settings for your domain and look for an option to change the ‘name servers’. For my domain below which is registered with Namecheap, you can see I have a drop-down box where I can change the name servers.
7. Once you have found the option to change the name servers for your domain, change them to match the two name servers provided to you by Cloudflare.
8. Once you have saved the new name server settings, go back to your Cloudflare page and click on the ‘Done, check nameservers’ button. On the following page, when asked about configuring other security settings, click the ‘Finish later’ link.
9. Sometimes a name server change can take up to 24 hours to take place, but once it has taken effect, Cloudflare will take over the DNS management for your domain. Once you receive notification that Cloudflare has taken over DNS management, head back to the guide to move on to the next step.