Issue: When opening web.airmore.com in the browser to establish a connection between the smartphone and the browser, the website is not loading correctly anymore.
When pinging this CDN I also received an ERR_NAME_NOT_RESOLVED error. Using an online ping tool (http://www.dnstools.ch/online-ping.html) revealed the IP of this host – so it was save to assume that the host was in fact not down – I just did not get the domain resolved by my DNS.
The most simple solution would be to edit the hosts file on your operating system to point the hostname to specifically this IP address. However I’m using Pihole as a DNS / adblock tool and wanted to have Pihole resolve the host. The GUI unfortunately does not contain any setting to add a custom resolution. A github issue revealed the possibility to add custom files which will be used by Pihole for DNS.
So I just added a new file on my Pihole host /etc/dnsmasq.d/custom-hosts.conf and added the following content.
After saving the file I had to restart dnsmasq for the change to take effect. This can be done in the Pihole GUI in the settings tab. Once dnsmasq restarted the website web.airmore.com was working correctly again.
If the IP of the CDN host changes or the URL of the file changes to another CDN host the custom file will have to be edited again. So this is not a sustainable fix for an issue like this, but a quick fix to demonstrate the power of Pihole.