Does every domain have unique IPs?

前端 未结 4 1783
迷失自我
迷失自我 2021-02-03 12:45

I want to know whether every domain adress has a unique IP adress? Furthermore, where these IP\'s are located? and how does this redirection system works? When we try to access

4条回答
  •  日久生厌
    2021-02-03 13:37

    No : each domain does not have its own IP address.

    Several domains can be hosted on the same server -- and on the same IP address.
    That's the idea behind Apache's VirtualHosts, for example.


    And one domain-name can correspond to several distinct IP addresses.

    For example, using the dig command on the google.fr domain, you'd get (I only copy-pasted a portion of the output) :

    $ dig google.fr
    
    ;; ANSWER SECTION:
    google.fr.              71      IN      A       74.125.230.81
    google.fr.              71      IN      A       74.125.230.82
    google.fr.              71      IN      A       74.125.230.83
    google.fr.              71      IN      A       74.125.230.84
    google.fr.              71      IN      A       74.125.230.80
    


    For more informations, you should probably read the following wikipedia entry : Domain Name System.

提交回复
热议问题