How can Cloudflare cache my site if A-records point direct to my server

I am new to Cloudflare. We have an account and I have pointed my nameservers at Cloudflare. However the A-record on the domain (and www.domain) points direct to my web server’s IP address.

This means that any requests to load from the website will go direct to my server, bypassing Cloudflare completely. So how can Cloudflare cache anything? It’s only being used to resolve the DNS lookup.

I must surely be wrong but I don’t understand how caching is going to work (even though caching is switched on for my domain) given that the IP returned for www GET requests to my domain is not a Cloudflare IP.

It can’t unless you :orange: the record in DNS. Then Cloudflare advertises an IP address of it’s proxy to visitors and sends uncached requests tot he origin.

1 Like

Ah… I see now that pinging [my domain] returns my original server IP (but this just returns a 301 redirect to www)… however pinging www.[my domain] is now returning a Cloudflare IP. It took a little while to kick in.

So it dynamically changes the IP and assigns a proxy. Makes sense, Thanks.


This topic was automatically closed after 31 days. New replies are no longer allowed.