While using Cloudflare will it impact AWS Cloudfront?

Hi Everyone,

I am having little confusion trying to use Cloudflare and AWS Cloudfront, Especially with Cloudflare DNS, I am thinking DNS records pointing to AWS Cloudfront with passing through Cloudflare, will it impact AWS CDN performance?

The thought is colliding here at 2 points -

  1. Cloudflare provides in built CDN but the CDN is on user’s browser side and is good for static website but not good for dynamic websites like (news portals) who have frequent updates. the front end user’s caching always remains cached and does not flush unless user clears it themselves.

  2. Cloudflare provides also only DNS as a service which practically acts as only DNS and no Cloudflare protection services be enabled.

While we have Cloudflare on a dynamic website which is a news portal and is updated often in terms of contents. but bigger question comes here is that with Cloudflare front end caching whenever our site is updated with new content probably the user will not see the latest version of the site unless he clears his cache.

Certain parts of site are still served by cloudfront,
hence in Cloudflare DNS I had to create a CNAME with the cloudfront custom domain pointed to cloufront distribution.

WHat I am thinking if this record in cloudlfare be good to pass through cloudfront or will DNS only be good enough so that no service conflict happens.

Another question,
Cloudflare does provide certain basic protection like Bot/Malware/DDOS etc. which I wish to opt for but can I also opt out from the Cloudflare CDN which comes along with these services?

if yes How can I opt out of cloudfront CDN?



Yes, it will.

It depends on how you configure Cloudflare. Many sites use Cloudflare, even though they are dynamic with lots of content updates each hour.

DNS-only mode works perfectly with Cloudfront.

If you want to disable Cloudflare, you’ll have two options:

  1. Change your domain’s nameservers back to your registrar’s defaults (or whichever you want). If your domain is registered using CF registrar, you aren’t allowed to do so (dunno why).
  2. Un-proxy your DNS connections. You should edit the DNS records that are proxied (:orange:) and set them to unproxied (:grey:). If you do so for all DNS connections, Cloudflare will not interfere with your site.

Hope it helps!

@Lumito - Thanks a lot your answers helped me a lot,
One thing I found interesting

Do you have some more information about how this can be achieved? because my website tnbclive which is a dynamic news website, I would be extremely happy to get it proxied through Cloudflare and its CDN, but I am worried that the CDN will work as browser side caching.

so in a use case like if a user visits my website now and then let’s say from now on until next 1 hour if he visits the site again he is likely to see the same content. Possibly the site might get updated with new content but he won’t see it… As he will continue to see the cached version until TTL expires on his end.

Although I don’t mind serving the site’s static asset contents over CDN as they are likely to be remain same always like (.js/css) but I have huge concern with the contents.

Can you please help me here?


You should be able to bypass cache by using Cache Rules. For example, for a domain I own (opensoft.me), this should bypass all cache (correct me if I’m wrong):

You can also play with rules to, for example, allow a specific folder to be cached (adding an OR statement).

Hope it helps!

1 Like

Considering the view made by @Lumito you can also set that too using Browser Cache TTL to the expected time you think of.

More on the topic here:

1 Like

@Lumito and @neiljay

Thanks guys, this looks promising I’ll try to play with cache rules and see what’s best I can take out from there. Browser Cache TTL I’ve already explored and set it to Respect Existing Headers. I’ll look into it in more detail. (Just to clarify Edge Caching and Server Side Caching looks like same I believe? and they can be configured from page rules).

Can you also suggest usually what configurations should I use while creating page rules if I have wordpress website? Any suggestions?

Thanks again

I’m afraid that’s not it is. Edge Cache TTL (Time to Live) specifies how long to cache a resource in the Cloudflare edge network. Edge Cache TTL is not visible in response headers and the minimum Edge Cache TTL depends on plan type. Check the above linked post.

Server-side instead be - Origin cache (as said). Here’s the in-depth information to how to achieve the best:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.