1

I know that to point a new domain to my existing host, I have to specify the nameservers for the host on the domain's registrar site.

But I'm not sure how can the hosting provider know which hosting account I'm pointing to ?

I guess that a single server can have multiple sites in it (at least in a shared hosting)

Say I have shared hosting and the http://www.my-old-site.com which points to the following nameservers :

ns1.example.com and ns2.example.com

Now I have bought a domain names www.new-domain.com, and I set the nameservers of the domain to ns1.example.com and ns2.example.com

Why the new domain will point to my site and not to any other site within the same server? What if there are 100 sites on the same server, How can the hosting provider know which site I want to point to?

2 Answers 2

0

Multiple site hosting is made via "Virtual host" concept. It is present in the majority of actual web servers.

Multiple sites, with different names, point to the same ip address. When the client connect to http server, it ask for a specific site identifiled via url. Then webserver look for that specific site in it's list of virtualhosts and send to the client the correct pages.

Apache webserver http://httpd.apache.org/docs/2.2/vhosts/examples.html

IIS webserver http://support.simpledns.com/kb/a82/virtual-hosting-with-iis-internet-information-services.aspx

0

It isn't clear what exactly your question is. If you have already set up new-domain.com with your hosting provider, then yes, all you need to do is point your domain to the nameservers of your hosting company. maudam has explained why this works.

OTOH, if all you have done is set up the new domain, and made no arrangements with the hosting provider, then not only will there be no webserver configured to handle your site, but even the hosting company's nameservers will not know about new-domain.com and pointing your new domain's DNS to those nameservers won't work. You must involve the hosting company in any new domain configuration (apart from setting up a redirect on the new domain to the old domain).

OTTH, if you control your own server with its own static IP, you don't need the hosting company to do anything, because you can configure the server yourself and the DNS does not need to be delegated to the hosting company's nameservers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .