Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does every domain have unique IPs?

Tags:

ip

dns

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 a web site by writing domain name how many redirections does it have?

Thanks...

like image 545
Yunus Eren Güzel Avatar asked Mar 22 '11 11:03

Yunus Eren Güzel


4 Answers

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.

like image 188
Pascal MARTIN Avatar answered Oct 13 '22 02:10

Pascal MARTIN


I want to know whether every domain adress has a unique IP adress?

No. There are domains with more than one IP and IPs with more than one domain.

Furthermore, where these IP's are located?

They are not located anywhere, they are an abstract address of some computer(s)

and how does this redirection system works? When we try to access a web site by writing domain name how many redirections does it have?

Which redirection system do you mean?

like image 33
Philipp T. Avatar answered Oct 13 '22 00:10

Philipp T.


Not every domain address has unique IP. There may be more than one domain addresses on same IP. Every domain have DNS and these DNS pointing to server who redirect different domains (with virtual hosts) for exampple.

like image 44
Faraona Avatar answered Oct 13 '22 02:10

Faraona


No, each domain doesn't need to have its own allocated IP address. IPs can be physically located anywhere. Redirection is usually done via user agents following HTTP instructions.

See

http://en.wikipedia.org/wiki/Domain_Name_System

http://en.wikipedia.org/wiki/HTTP

like image 31
trickwallett Avatar answered Oct 13 '22 00:10

trickwallett