I used Cloudflare to anti attack, but its dns server point to the ip where my server is. I have set up a self CDN group, it needs to direct the visitor to different server base on visitor's ip. is it possible to set a second level dns server after Cloudflare DNS Server?

Your comment welcome


No. Once a name is resolved to an IP - that IP is used for that domain. For the HTML on the site Cloudflare is protecting there's no way to redirect a user.

However, you can host your content (images, videos, js, css, etc.) on a different CDN with a new domain. This would trigger a new DNS request.

The problem with this is that people can still attack your servers. Anything that exposes the IP address of one of your servers will mean they can attack it. This defeats the point of Cloudflare.

The other point I have to raise is that if you're using Cloudflare - it's already acting as a CDN. Depending on your purpose, you could be building a redundant system.


The IP you set up in CF's DNS is only known by you and CF while that cloud is orange for that DNS entry. It's not public. This is only to tell CF where to get the data from. The public will only see CF's servers' ip addresses. This is how your origin servers are protected.

Different users around the globe will resolve your domain name to different IP addresses (all of which are CF's). CF then serves their cached data from their most-efficient server. This is how your content is distributed globally by CF.

Aside from that which is already handled by CF, what are you looking to do?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.