Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.