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.
I’m using the Airmore app to connect from my desktop computer to my phone to transfer files. Recently the website for the connection, which is available by web.airmore.com, did not load anymore correctly. It was just plain HTML without Javascript and Stylesheets.
When opening the Developer Tools in Chrome there were some errors visible in the console tab. The stylesheet and a Javascript file could not be loaded and received a ERR_NAME_NOT_RESOLVED error. On a closer look these files were to be loaded from a CDN: dpz3v.aoscdn.com
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.
address=/dpz3v.aoscdn.com/47.246.43.170
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.