What does DNS-servers map, besides the IP-address?
As I understand it, a DNS server 'simply' looks up in some sort of table and find the IP-address associated with the domain you are trying to access. Then the IP-address is returned to you browser and the browser will make some http-request to that IP-address, and you get the http-response (Webpage) returned.
When I lookup or trace the IP-address of eg. wikipedia.org I get:
91.198.174.192
But when I then try to access that IP-address directly, I do not get the normal wikipedia.org frontpage, but instead I access some 'mother'-server in the Wikimedia-foundation.
So clearly some extra information must be mapped besides the raw IP-address. Can anyone explain how the server knows the difference?
networking dns ip
add a comment |
As I understand it, a DNS server 'simply' looks up in some sort of table and find the IP-address associated with the domain you are trying to access. Then the IP-address is returned to you browser and the browser will make some http-request to that IP-address, and you get the http-response (Webpage) returned.
When I lookup or trace the IP-address of eg. wikipedia.org I get:
91.198.174.192
But when I then try to access that IP-address directly, I do not get the normal wikipedia.org frontpage, but instead I access some 'mother'-server in the Wikimedia-foundation.
So clearly some extra information must be mapped besides the raw IP-address. Can anyone explain how the server knows the difference?
networking dns ip
add a comment |
As I understand it, a DNS server 'simply' looks up in some sort of table and find the IP-address associated with the domain you are trying to access. Then the IP-address is returned to you browser and the browser will make some http-request to that IP-address, and you get the http-response (Webpage) returned.
When I lookup or trace the IP-address of eg. wikipedia.org I get:
91.198.174.192
But when I then try to access that IP-address directly, I do not get the normal wikipedia.org frontpage, but instead I access some 'mother'-server in the Wikimedia-foundation.
So clearly some extra information must be mapped besides the raw IP-address. Can anyone explain how the server knows the difference?
networking dns ip
As I understand it, a DNS server 'simply' looks up in some sort of table and find the IP-address associated with the domain you are trying to access. Then the IP-address is returned to you browser and the browser will make some http-request to that IP-address, and you get the http-response (Webpage) returned.
When I lookup or trace the IP-address of eg. wikipedia.org I get:
91.198.174.192
But when I then try to access that IP-address directly, I do not get the normal wikipedia.org frontpage, but instead I access some 'mother'-server in the Wikimedia-foundation.
So clearly some extra information must be mapped besides the raw IP-address. Can anyone explain how the server knows the difference?
networking dns ip
networking dns ip
asked Jan 4 at 23:29
OrpedoOrpedo
34737
34737
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
There are multiple things at play here.
In the case of a website DNS does translate a domain name into an IP address so the client knows the server to communicate with. Due to the shortage if IP space, multiple websites can be hosted on a so while server so it's standards for the browser to additionally tell the server which site it wants (part of the http 1.1 spec which expands on the ancient 1.0 spec that does not do this). The specific field sent by the client to the server (one of the first) is a Host: header. Indeed if you telnet to the given IP address, then type "GET /path/to/resource.file" host: domain.name an http website will return the HTML result if the request.
DNS is, however, significantly more complex then just mapping domain names to IP addresses, including many kinds of lookips to facilitate arbirtrary text fields (which facilitate spam management, site verification and other things), mail exchange priorities, server/port assignments for services that support it, redirection and delegation.
add a comment |
Your browser includes in the HTTP request the domain and document it wants from the server. For example, www.wikipedia.com/index.html. The server can be running more than one website, and it will need this information to know what website and what page you want to view. If you put in 'http://91.198.174.192/', no domain nor page is sent with your request. If the server has no default domain, then you will see an error. In this case, the default domain is a small error website.
A perfect example is a shared web host. There are generally many sites shareing one IP address.
– HazardousGlitch
Jan 4 at 23:41
add a comment |
There are two instances of mapping involved in the example in your question:
- Mapping in the DNS
- Virtual host mapping
On the DNS side, the canonical DNS hostname <-> IP address mapping is only one of the possibilities, it is called the "A-Record" (or AAA for IPv6), but there exist other record types, the most prominent of which are the MX record, which holds the information which mail server is to be contacted if you want to send E-Mail to an address in a domain. There are ofcourse many others, e.g. SOA (Start of authority) and NS (Nameserver) records, which hold together the tree-structure of domains in the distributed database that is the DNS system.
The virtual host mapping is a mechanism totally independent of DNS, that allows (since HTTP version 1.1) to host different WWW-domains on the same IP address. It works by your browser accessing the IP address as fetched from DNS, but additionally sending a Host: header with the requested domain. This is the reason why you got an unexpected answer when calling the IP address directly in your browser: The address was the same, but the Host: header was different.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390732%2fwhat-does-dns-servers-map-besides-the-ip-address%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are multiple things at play here.
In the case of a website DNS does translate a domain name into an IP address so the client knows the server to communicate with. Due to the shortage if IP space, multiple websites can be hosted on a so while server so it's standards for the browser to additionally tell the server which site it wants (part of the http 1.1 spec which expands on the ancient 1.0 spec that does not do this). The specific field sent by the client to the server (one of the first) is a Host: header. Indeed if you telnet to the given IP address, then type "GET /path/to/resource.file" host: domain.name an http website will return the HTML result if the request.
DNS is, however, significantly more complex then just mapping domain names to IP addresses, including many kinds of lookips to facilitate arbirtrary text fields (which facilitate spam management, site verification and other things), mail exchange priorities, server/port assignments for services that support it, redirection and delegation.
add a comment |
There are multiple things at play here.
In the case of a website DNS does translate a domain name into an IP address so the client knows the server to communicate with. Due to the shortage if IP space, multiple websites can be hosted on a so while server so it's standards for the browser to additionally tell the server which site it wants (part of the http 1.1 spec which expands on the ancient 1.0 spec that does not do this). The specific field sent by the client to the server (one of the first) is a Host: header. Indeed if you telnet to the given IP address, then type "GET /path/to/resource.file" host: domain.name an http website will return the HTML result if the request.
DNS is, however, significantly more complex then just mapping domain names to IP addresses, including many kinds of lookips to facilitate arbirtrary text fields (which facilitate spam management, site verification and other things), mail exchange priorities, server/port assignments for services that support it, redirection and delegation.
add a comment |
There are multiple things at play here.
In the case of a website DNS does translate a domain name into an IP address so the client knows the server to communicate with. Due to the shortage if IP space, multiple websites can be hosted on a so while server so it's standards for the browser to additionally tell the server which site it wants (part of the http 1.1 spec which expands on the ancient 1.0 spec that does not do this). The specific field sent by the client to the server (one of the first) is a Host: header. Indeed if you telnet to the given IP address, then type "GET /path/to/resource.file" host: domain.name an http website will return the HTML result if the request.
DNS is, however, significantly more complex then just mapping domain names to IP addresses, including many kinds of lookips to facilitate arbirtrary text fields (which facilitate spam management, site verification and other things), mail exchange priorities, server/port assignments for services that support it, redirection and delegation.
There are multiple things at play here.
In the case of a website DNS does translate a domain name into an IP address so the client knows the server to communicate with. Due to the shortage if IP space, multiple websites can be hosted on a so while server so it's standards for the browser to additionally tell the server which site it wants (part of the http 1.1 spec which expands on the ancient 1.0 spec that does not do this). The specific field sent by the client to the server (one of the first) is a Host: header. Indeed if you telnet to the given IP address, then type "GET /path/to/resource.file" host: domain.name an http website will return the HTML result if the request.
DNS is, however, significantly more complex then just mapping domain names to IP addresses, including many kinds of lookips to facilitate arbirtrary text fields (which facilitate spam management, site verification and other things), mail exchange priorities, server/port assignments for services that support it, redirection and delegation.
answered Jan 4 at 23:56
davidgodavidgo
43.5k75291
43.5k75291
add a comment |
add a comment |
Your browser includes in the HTTP request the domain and document it wants from the server. For example, www.wikipedia.com/index.html. The server can be running more than one website, and it will need this information to know what website and what page you want to view. If you put in 'http://91.198.174.192/', no domain nor page is sent with your request. If the server has no default domain, then you will see an error. In this case, the default domain is a small error website.
A perfect example is a shared web host. There are generally many sites shareing one IP address.
– HazardousGlitch
Jan 4 at 23:41
add a comment |
Your browser includes in the HTTP request the domain and document it wants from the server. For example, www.wikipedia.com/index.html. The server can be running more than one website, and it will need this information to know what website and what page you want to view. If you put in 'http://91.198.174.192/', no domain nor page is sent with your request. If the server has no default domain, then you will see an error. In this case, the default domain is a small error website.
A perfect example is a shared web host. There are generally many sites shareing one IP address.
– HazardousGlitch
Jan 4 at 23:41
add a comment |
Your browser includes in the HTTP request the domain and document it wants from the server. For example, www.wikipedia.com/index.html. The server can be running more than one website, and it will need this information to know what website and what page you want to view. If you put in 'http://91.198.174.192/', no domain nor page is sent with your request. If the server has no default domain, then you will see an error. In this case, the default domain is a small error website.
Your browser includes in the HTTP request the domain and document it wants from the server. For example, www.wikipedia.com/index.html. The server can be running more than one website, and it will need this information to know what website and what page you want to view. If you put in 'http://91.198.174.192/', no domain nor page is sent with your request. If the server has no default domain, then you will see an error. In this case, the default domain is a small error website.
answered Jan 4 at 23:36
AndyAndy
35814
35814
A perfect example is a shared web host. There are generally many sites shareing one IP address.
– HazardousGlitch
Jan 4 at 23:41
add a comment |
A perfect example is a shared web host. There are generally many sites shareing one IP address.
– HazardousGlitch
Jan 4 at 23:41
A perfect example is a shared web host. There are generally many sites shareing one IP address.
– HazardousGlitch
Jan 4 at 23:41
A perfect example is a shared web host. There are generally many sites shareing one IP address.
– HazardousGlitch
Jan 4 at 23:41
add a comment |
There are two instances of mapping involved in the example in your question:
- Mapping in the DNS
- Virtual host mapping
On the DNS side, the canonical DNS hostname <-> IP address mapping is only one of the possibilities, it is called the "A-Record" (or AAA for IPv6), but there exist other record types, the most prominent of which are the MX record, which holds the information which mail server is to be contacted if you want to send E-Mail to an address in a domain. There are ofcourse many others, e.g. SOA (Start of authority) and NS (Nameserver) records, which hold together the tree-structure of domains in the distributed database that is the DNS system.
The virtual host mapping is a mechanism totally independent of DNS, that allows (since HTTP version 1.1) to host different WWW-domains on the same IP address. It works by your browser accessing the IP address as fetched from DNS, but additionally sending a Host: header with the requested domain. This is the reason why you got an unexpected answer when calling the IP address directly in your browser: The address was the same, but the Host: header was different.
add a comment |
There are two instances of mapping involved in the example in your question:
- Mapping in the DNS
- Virtual host mapping
On the DNS side, the canonical DNS hostname <-> IP address mapping is only one of the possibilities, it is called the "A-Record" (or AAA for IPv6), but there exist other record types, the most prominent of which are the MX record, which holds the information which mail server is to be contacted if you want to send E-Mail to an address in a domain. There are ofcourse many others, e.g. SOA (Start of authority) and NS (Nameserver) records, which hold together the tree-structure of domains in the distributed database that is the DNS system.
The virtual host mapping is a mechanism totally independent of DNS, that allows (since HTTP version 1.1) to host different WWW-domains on the same IP address. It works by your browser accessing the IP address as fetched from DNS, but additionally sending a Host: header with the requested domain. This is the reason why you got an unexpected answer when calling the IP address directly in your browser: The address was the same, but the Host: header was different.
add a comment |
There are two instances of mapping involved in the example in your question:
- Mapping in the DNS
- Virtual host mapping
On the DNS side, the canonical DNS hostname <-> IP address mapping is only one of the possibilities, it is called the "A-Record" (or AAA for IPv6), but there exist other record types, the most prominent of which are the MX record, which holds the information which mail server is to be contacted if you want to send E-Mail to an address in a domain. There are ofcourse many others, e.g. SOA (Start of authority) and NS (Nameserver) records, which hold together the tree-structure of domains in the distributed database that is the DNS system.
The virtual host mapping is a mechanism totally independent of DNS, that allows (since HTTP version 1.1) to host different WWW-domains on the same IP address. It works by your browser accessing the IP address as fetched from DNS, but additionally sending a Host: header with the requested domain. This is the reason why you got an unexpected answer when calling the IP address directly in your browser: The address was the same, but the Host: header was different.
There are two instances of mapping involved in the example in your question:
- Mapping in the DNS
- Virtual host mapping
On the DNS side, the canonical DNS hostname <-> IP address mapping is only one of the possibilities, it is called the "A-Record" (or AAA for IPv6), but there exist other record types, the most prominent of which are the MX record, which holds the information which mail server is to be contacted if you want to send E-Mail to an address in a domain. There are ofcourse many others, e.g. SOA (Start of authority) and NS (Nameserver) records, which hold together the tree-structure of domains in the distributed database that is the DNS system.
The virtual host mapping is a mechanism totally independent of DNS, that allows (since HTTP version 1.1) to host different WWW-domains on the same IP address. It works by your browser accessing the IP address as fetched from DNS, but additionally sending a Host: header with the requested domain. This is the reason why you got an unexpected answer when calling the IP address directly in your browser: The address was the same, but the Host: header was different.
answered Jan 4 at 23:51
Eugen RieckEugen Rieck
10k22128
10k22128
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390732%2fwhat-does-dns-servers-map-besides-the-ip-address%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown