SyntaxFix
Write A Post
Hire A Developer
Questions
It happens that /etc/hosts file doesn't support wild card entries.
/etc/hosts
You'll have to use other services like dnsmasq. To enable it in dnsmasq, just edit dnsmasq.conf and add the following line:
dnsmasq.conf
address=/example.com/127.0.0.1