Well too bad Google won't let you on the phone, Firefox at least allows you to install ublock.
dns blocking would only see the domain coolblog.org, and doesn't see that it loads ad.js, so it won't block anything.
But e.g. uBlock, also sees that your browser tries to visit ad.js, if uBlock had ad.js in its blocklists it can block loading this script.