#https://askubuntu.com/questions/233195/route-complete-tld-dev-for-example-to-127-0-0-1#233224
Disable systemd-resolved
sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved.service
sudo rm /etc/resolv.conf
Edit /etc/NetworkManager/NetworkManager.conf to use dnsmasq for DNS.
[main]
dns=dnsmasq
Put dnsmasq configuration in /etc/NetworkManager/dnsmasq.d/test-tld.conf
address=/test/127.0.0.1
address=/customerX.test/192.168.33.10
and finally restart NetworkManager which will generate a new /etc/resolv.conf
sudo systemctl restart network-manager.service