I am trying to get my Mac to resolve abc.com to xyz.com.

Tried in /private/etc/hosts:

abc.com xyz.com


abc.com in CNAME xyz.com

Neither works. Anyone know how to do this?

  • 1
    You probably want to add a local dns server to your computer, look into dnsmasq. – Camden Narzt Jan 7 '17 at 18:08

Well, the hosts file is formatted as "IP_address hostname..." (as many hostnames as you need), so you could put the ip, followed by both abc.com and xyz.com. It's not designed to work as a local CNAME. It's a local resolver (think A record type action)...

  • 1
    I am trying to resolve an address on heroku, not sure if the ip address does not change... – exolab Mar 2 '12 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.