Use CNAME url for proxy

I’m using Caddy 1.
How Caddy resolve the URL I use in the proxy? Does we will face problem if our URL change the IPs behind the URL all the time?
Does using IP will be the best choice?

Thanks

Hey Noam – if you specify a proxy upstream using a domain name, the local DNS resolver will be used to determine the machine’s IP address. Quite often, DNS is the common factor in frustrating networking problems, so I would always recommend using IP addresses when possible.

Does Caddy save the result of the DNS resolver on cache for some time or for every request it use it?

Almost all DNS resolvers are caching resolvers already; Caddy does not concern itself with that, it just asks the system for a DNS lookup and the system responds, which is almost always from a cache (dictated by DNS entry’s TTL value, or at least, it’s supposed to be). DNS resolvers are typically present in the OS, the LAN/router, the ISP, and possibly even further out.