Why do ad services not use ip numbers directly instead of domains?


What is the reason that advertisers and trackers use domain names that can be blocked by a DNS sinkhole (such as Pi-Hole) rather than simply use the IP numbers directly? If I understand things correctly, if using an IP number there is no need to use a DNS, and that would render a DNS sinkhole ineffective.


On one IP there can be many websites listening and having each their own IP is expensive or even impossible.


Also domain names are less effort to maintain in web code than IP numbers. If your ad server gets moved with IP you need to find every mention an dupdate it, with DNS you just update the DNS server.
Advisers are looking at ways to get around domain based blocking systems and at some point they may become worthless, but until then they are easy to implement and work well.


Ok, thanks.