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

The way I know commercial hosting on shared servers is like the following:

    1)ns records with web host 
    2)I have to configure the domain with my registrar to 
have the ns records hosted by web host

But how will it work if I wanted the ns records to hosted by my registrar for redundency. How does the web server know which site to serve ?

share|improve this question
up vote 3 down vote accepted

Is it possible? Yes, certainly. Web hosting and DNS services are two completely separate functions. Yes, they can coexist on the same server, but they don't need to.

Just point your domain's NS records to whomever you want and then create an A record pointing to your webserver. When your browser makes a request to the webserver, it submits as part of the HTTP GET request a host header with the hostname of the website it's requesting. The server then responds appropriately. In fact, this would all still happen even if the webserver was not set up with proper DNS resolvers.

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.