Cloudflare DNS Setup for New Domain – Name Servers, A Record, MX record

In Technology by KumarLeave a Comment

Setting up Cloudflare when you buy a new domain can get sometimes complicated. Below are the steps.

  1. First you need to buy the domain name at any registrar. In our experience, Namecheap provides the cheapest in the market and always there are some promotions. Make sure you search for Namecheap coupons and get latest month coupon code to get some sort of discount.
  2. Once you buy the domain name, your initial name servers on the domain with be placeholder given by the provider, where you bought your DNS. You need to change that with CloudFlare.
  3. If you do not have an account, sign-up for a new account with Cloudflare and then login to the account.
  4. Add a new website and enter the new domain name you just purchased. If you click next, by default, it will detect the default name servers and then show you the status. Now is the time to put in correct details
    • You need to enter your server’s IP address for the A Record
    • You can put in CNAME record with WWW and put in @ to point to same URL/IP. Basically, this is to make sure the domain name with www or non-www will get you to the same domain
    • If you want to use your email server, You can setup MX records the same way, just create two A records with mx1 and mx2 and put in your server IP address there. Then create two MX records with mx1.yourdomainame.com, mx2.yourdomainname.com and put in some priority like 10 or 1.
    • That’s it, you need to click next and you will be given two name servers like pete.cloudflare.com or something like that and it will ask you to update it on the Domain

Setup CloudFlare DNS with New Domain.

5.  Now, you take the DNS servers given by CloudFlare and then go to your DNS registrar admin section of the domain and change the name servers. You should select custom name server and then put in the name server address given by CloudFlare and save it.

6. Once done, that’s it you are all set now. It takes few minutes to propagate and if you check on Cloudflare in like 5 min or less, it will show it is all up and running.

In the past, it used to take a long time for the Name server updates, but now with the latest servers, the DNS propagation time is like 5 min. 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.