1

i would like to know how a shared hosting ip works.. for example when we want to access the website "abc.com" and the DNS return with its IP address (1.1.1.1)..

however IP 1.1.1.1 is is a shared IP with domain "cde.com" and "efg.com", so when our browser surf to 1.1.1.1 , how do the hosting company know which domain we are looking for since there are 3 domains (abc.com, cde.com, efg.com) in ip 1.1.1.1 ?

appreciated help.. thank you..

1
  • When you signed for the hosting you provided your domain. Typically multiple domains would cost more contact your provider and specific instructions
    – Ramhound
    Commented Dec 20, 2016 at 19:22

1 Answer 1

2

An HTTP request includes a header that defines the host that it wants to retrieve. The server is configured to use that header to lookup server the appropriate content. Also see SNI for HTTPS requests

1
  • so what you meant is that after our PC got an IP from DNS, with the HTTP get or post request, it will include the domain name and send to the said IP address, thereafter the hosting company will then look up the domain name and refer direct to it .. am i right ? by the way, is it only apply to http/s request ? if i conducting a port scan on the said IP, it is actually scanning on the ports of the IP itself and not the website rite ?
    – IT-Learner
    Commented Dec 22, 2016 at 5:32

You must log in to answer this question.

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