I am doing some research to prepare some web development environment for our small(10ppl and growing) new office.

User Case: For each new web project usually we create new alias on an Apache server someproject.companywebsite From my understanding in order to see this website locally for all the rest of our team(including mangers and directors) they will need to edit hosts file (e.g. " someproject.companywebsite"), and like that each time for a new project(can be 2-5 each week)

Solution: And I looking for a solution how to edit this hosts file only once and distribute it over all mac machines in our network at once or much more flawlessly than poking around with each machine every time over and over again. Is that possible? Or that a very wrong way of doing that?

Perhaps we better set up own local dns server and point to it our router? Though own dns server a bit concerns me because of might be some network interruption and others lags, if you know what I mean.

Or perhaps there are another workflows for that? What's the best way for such things?

So I'll be so grateful to hear some advices from experienced admins. I couldn't find that info on internet, so if you know where to read about it, point me in a right direction.

Thank you in advance Alex

4 Answers 4


You can actually set your DNS records (on the domain itself) to use local area networks. For example, I have one domain on our network going to `' which only works inside our network, but if someone in another country pings it, it will indeed resolve to that IP. This is probably easier than to distribute host files, because it doesn't require updating all of them.

Alternatively you can run a local DNS server and have all the workstations use that to resolve domains.


Alex, I think using your own DNS server is a better and easy to administer solution than to distribute hosts files across your machines.

Here are my suggestions:

  1. Install Homebrew
  2. Install [Dnsmasq] 2 and read the man
  3. Set up the main DNS on dev's Macs to the Mac running Dnsmasq

Now Alex, you may use DNS forwarders to speed up your name resolution a bit more.


Editing hosts files on all your machines for each project 2-3 times per week is not efficient agreed? Why not use an internet domain which you all have accessed to used for development only. Secure it with htaccess to your office IP's or simply password protect it. You'll be able to create as many subdomains as you want for each project and not have to worry about editing hosts files on each mac machine. Your own local DNS server? Again not efficient for trying to manage 10 people developing websites when so many simpler methods exist. You're opening up a can of worms, what happens when DNS goes down, fails, is hacked, or needs updates?

Amazon offers 1 free year of a micro instance. That plus subversion should keep all your developers working together easily.


To add to what ionfish and jmontano said, you can set up your own DNS server so that it behaves differently based upon where the request comes from. That way, you can have a public server that has a private side. Our server has a public static IP with only mail and web available, but then has a local IP (10.n.n.n) that supplies AFP and other services, but ONLY to the local network.

This way, you could share the files instead of distributing them, and still be secure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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