Feb 24, 2012

Trying to make it so on my mac (or entire local network) any *.dev domains point to an IP


I’m trying to move my development stuff over to a small local Debian based server running ispconfig, and need to basically make it so that *.dev is routed to a specific IP. So for example I went to http://some-site.dev it would go to

Is there any way of doing this without a fancy/expensive router?


Asked by RickM


In Windows, I would say ‘modify your hosts file’. It turns out that my answer is exactly the same for Mac. The link will show you how to modify the HOSTS file in OSX, allowing you to resolve specific hostnames (such as http://site-name.dev) on a network where you have no DNS server.

Since my answer was downvoted, I figured I might as well expand on WHY I think this is the best option for you. Here’s a Microsoft article explaining the concept of hosts files (it also touches on the idea that *nix-based systems have the same file) and here’s a great blog post touching on the same thing, with the content focused on Mac’s.

Before DNS was prevalent, the hosts file was the way to go for specific name resolution. Since you do not have a DNS server (and building one can be a PITA, and overkill for what you explained you needed) just use the hosts file.

Answered by JohnThePro

Related posts:

  1. Testing domains on intranet/local network?
  2. In Webmin (BIND DNS), how do I make ns1.xx.com, ns2.xx.com point to 2 different IPs for multiple domains
  3. Mac Os Server, how to make bind point www.mydomain.com to the same machine bind is installed on?
  4. how to make local domain name available to people on LAN
  5. How Do I Point 2 Domains to 1 Website Using DNS?

Leave a comment