Setting up wildcard DNS forwarding on your development Mac OSX
It's a typical project, we usally add xyz.local into the hosts file on OSX, but in fact, you can just use a wildcard by doing the following:
(Assuming you already have macports installed, no I don't like brew)
sudo port install dnsmasqsudo port load dnsmasqsudo cp /etc/resolv.conf /etc/resolv.dnsmasq.confsudo vi /etc/resolv.dnsmasq.conf
Make sure you have: (if you use Google DNS servers)
nameserver 8.8.8.8
nameserver 8.8.4.4
sudo vi /opt/local/etc/dnsmasq.conf
Add
address=/.test/127.0.0.1
listen-address=127.0.0.1
resolv-file=/etc/resolve.dnsmasq.conf #(replace existing line with this)
(Please note don't use .local because Apple decided they own .local... bastards: http://support.apple.com/kb/TA20999?viewlocale=en_US)
Personally I have another address= line to redirect another testing domain to a VM that's running a proper production environment that you can't replicate in OSX as well. Remember to flush the cache after this if it ain't working.
Version
Last Updated
First Published
Comments
Any published comments will adhere to the etiquette policy and all e-mail addresses will be treated in accordance to the privacy policy.
Me in real-time
- If you see this, something's wrong with Twitter.
Blatant Plug
Support
I've pledged my support to these organisations, and I think you should too.






