How do I set up a custom domain with CloudFlare?
First of all, before you try to set up a custom domain with CloudFlare, make sure that you understand the details of setting up a CNAME DNS record by reading this FAQ first:

|  | What is the recommended way to set up a custom domain?

You should also watch our Setup Video even though it shows the setup process using the NameCheap registrar. The video explains many important details that are common to setting up a custom domain no matter what registrar or control panel you are using:

|  | How To Set Up A Custom Domain Using a CNAME DNS Record

Setting up your custom domain with CloudFlare …
Step 1: Create a CNAME record in the DNS Settings
From within CloudFlare, open your domain and click on the “DNS” button near the top to enter the DNS editor:
The DNS editor will show you all of the existing DNS records for your domain and give you the option to add new DNS records with an “Add Record” link above your existing settings.
For example, if you want your custom tracking domain to be `www.yourdomain.com`, you’d select “CNAME” from the drop-down menu on the left hand side, enter “www” in the “Name” section of the DNS entry, and point it to one of ClickMagick’s domains. Use `www.clkmg.com` for tracking links and split tests or `www.clkmr.com` for rotators.
Your entry should look like this:
If the “cloud” to the left of the “Add Record” button is orange, click it to turn it grey. This disables CloudFlare’s simulated CNAME records which are unnecessary for ClickMagick and they slow down your clicks.
Tip: If you want to use the secure `https:` protocol with your domain, leave CloudFlare’s simulated CNAME records turned ON. In the “on” state, the “cloud” next to the “Add Record” should look like: . All other setup instructions in this guide remain the same.
Click the “Add Record” button and you should see this CNAME entry:
CloudFlare will not allow you to enter duplicate CNAME entries. If you get an error, either delete the existing `www` entry and try again, or edit the existing entry and change its values to those above.
If you don’t want to use `www.yourdomain.com` for your tracking domain because it already points to another website, you’ll want to set the Domain Name to something other than `www`. The word `track` is a good choice, giving you `track.yourdomain.com` as your tracking domain:
Step 2: Add your custom domain to ClickMagick
Once you complete Step 1 above, the only other thing you need to do is add your custom domain to your ClickMagick account using the Domain Manager.
Be sure to add your custom domain exactly as you’ve set it up in Step 1 above e.g. either `www.yourdomain.com` or `track.yourdomain.com` in the examples above.
ClickMagick’s Domain Manager will thoroughly test your domain when you try to add it. If the Domain Manager accepts the domain, then you’ve set it up correctly and it’s working perfectly! Otherwise, read and follow any error messages you get.
Step 3: Create your custom domain without “www.” (optional)
If you’re using your custom domain only for tracking purposes, you’ll probably want to also set up the non-`www`. version of your domain (i.e., `yourdomain.com`). This would typically be the case if you’ve just bought your domain specifically for tracking purposes.
For example, if you just set up a CNAME record with a hostname of `www` as in Step 1 above, your tracking links will look like this:
`http://www.yourdomain.com/linkID`
However, if you leave off the `www` like this…
`http://yourdomain.com/linkID`
… the tracking domain will NOT work.
You have to set the non-`www` version up as well, and because the non-`www` domain does not have a Host Name, you cannot use a CNAME record to properly set it up. Instead, you need to use an “A” record.
Caution: You cannot make this change if you have ANY existing content at `yourdomain.com`. The second you add the “A” record, your domain will point to ClickMagick and not to your original website. This will break your existing website if you have one, and that includes a WordPress blog.
If you’re unsure whether you have existing content, just enter your domain without the `www.` and see what pulls up. If it’s a website you want to keep, then you can’t add the “A” record or you will lose that website…
Adding the “A” Record
To get started, if there’s an existing “A” record that shows just your domain with nothing in front of it, then you’ll need to delete it by clicking on the “X” at the right. You will almost certainly have to do this step. An existing entry will look like this, but with a different IP address:
Next, add a new “A” record, entering “@” for the Name field. Set the IP address to 50.97.212.250 for tracking domains or to 50.97.212.251 for rotator domains:
Click “Add Record” and your “A” record is all set up! It should look like this:
You will see other entries in your DNS records, but as long as you have only one CNAME entry for `www` and only one “A” record entry for `yourdomain.com`, then you’ve set it up correctly.
Step 4: Add your custom domain (without “www.”) to ClickMagick
Finally, you have to also add the non-www version of your domain to your Domain Manager
and you’ll be all set.