Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can ONE server be a DNS server AND a hosting server to host a websites files?

Thank you!

share|improve this question
Yes............ – John Gardeniers Jan 11 '11 at 0:03
up vote 3 down vote accepted

I don't see why not... Although it's inadvisable because if your server is compromised the attacker will be able to modify your DNS config.

share|improve this answer

Yes, it can. They are completely different services. It's akin to asking "can I put groceries in my truck while towing a trailer?"

share|improve this answer

yes, of course, but I strongly discourage using both of them on a single machine, because, as other mentioned before, an hacker could attack primarily the dns server, for reason I don't mention here, and compromise your machine and accordingly all other services running on it.

share|improve this answer

I've run one for years, including mail and ftp.

share|improve this answer

Yes, you can run a web server, DNS server, mail server and any other services you like on the one machine. However there are some things you may want to consider:

  • will this be your only DNS server? If so you may want to have someone else run your DNS, and host it in geographically diverse locations, on different networks, etc.
  • as you add other services to the machine, will it cope? However unless you expect to be very, very busy, handling DNS requests doesn't take up much in the way of resources, compared to other services.
  • DNS is a pain, is critical to everything that runs under your domain, and is usually a free service from your domain registrar... consider letting them do it :-)

I'm not sure I buy the "yes, but if one service is compromised the others can be too" argument, as surely the web server user would not be able to edit the name servers zone files...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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