Jump to content

Domain resolution?


davej

Recommended Posts

I've never registered a domain. Can a domain be pointed to anything but a top-level domain? For example could the domain dog001.com be pointed to a subdomain such as www.dogstuff.petstore.com? Or could the domain be pointed to a sub-directory such as www.petstore.com/dogstuff/ ?Also who or what handles the conversion of http://dog001.com to http://www.dog001.com ? Are these always the same?Thanks!

Link to comment
Share on other sites

Domain resolution is actually the resolution of a domain name to an IP address - the conversion between different URLs is just redirection and does not require any authority. You can redirect any URL to any other URL, even dog001.com to google.com, for example. You can also rewrite addresses to change where they point to without redirecting, however you need to be in control of the highest common domain name for the source and destination to do that, so you couldn't rewrite dog001.com to www.dogstuff.petstore.com (but you could rewrite it to www.dog001.com/dogstuff/).As for the www / no-www question, they are different URLs, just popularly made to point to the same place (edit: contrary to what Haris S says, they are not the same - if a URL looks different, it is different - just behind the scenes they may be rewritten). This behaviour can be controlled in many ways, such as through the web-server configuration using rewrites, or even on the server filesystem through symbolic links.

Link to comment
Share on other sites

Domain resolution is actually the resolution of a domain name to an IP address - the conversion between different URLs is just redirection and does not require any authority. You can redirect any URL to any other URL, even dog001.com to google.com, for example. You can also rewrite addresses to change where they point to without redirecting, however you need to be in control of the highest common domain name for the source and destination to do that, so you couldn't rewrite dog001.com to www.dogstuff.petstore.com (but you could rewrite it to www.dog001.com/dogstuff/).As for the www / no-www question, they are different URLs, just popularly made to point to the same place. [...]
1. So am I understanding you correctly that I could go to networksolutions.com or whoever and buy the domain dogstuff.com and fill in the domain owner's form so that dogstuff.com would henceforth resolve to the already hosted site www.catlady.com but...2. I could not have the dogstuff.com domain resolve to www.catlady.com/otherstuff/dogs/ ? 3. And I could not have the dogstuff.com domain resolve to www.dogstuff.catlady.com ?4. Who decides whether both dogstuff.com and www.dogstuff.com resolve to the same IP address?5. Is there a big huge FAQ on this topic somewhere that I should read?Thanks!
Link to comment
Share on other sites

Be careful what you mean by resolve - domain names can't resolve to one another, they can only resolve to IP addresses. You can make dogstuff.com resolve to the same IP address as www.catlady.com, but this wouldn't necessarily make it load the www.catlady.com site, as that would require additional configuration on the www.catlady.com server. If you do control the server at www.catlady.com, then you can make it load whatever page you want when someone accesses dogstuff.com – doing so does not involve the DNS.URLs can be redirected, so that when you go to dogstuff.com, www.catlady.com appears in the address bar instead — this can be done from any address to any other address. They can also be rewritten, so a page loaded by dogstuff.com is actually represented by a different URL, but people still see dogstuff.com. This can only be done between a single domain that you have control over, so dogstuff.com could not be rewritten to any of the catlady.com addresses (but could be rewritten to, say, dogstuff.com/abc/). Again, this does not involve the DNS.

4. Who decides whether both dogstuff.com and www.dogstuff.com resolve to the same IP address?
The person who decides what IP address those URLs resolve to is the person with control of the nameserver information for dogstuff.com (the nameserver is the server that tells the DNS what IP the domain name resolves to), but the person who decides what pages those URLs load is anyone who can modify the webserver at the IP address they resolve to.
5. Is there a big huge FAQ on this topic somewhere that I should read?
Your registrar may have some FAQs.P.S. note that there is no real difference between a "subdomain" and "domain" – for example, dogstuff.com is actually a subdomain of com. Subdomains are just domains whose parent you own.---Edit: miniFAQ!What happens when someone enters a URL in the address bar?Perhaps some explanation of what happens when you type in a URL in the address bar would help. Say you type in "dogstuff.com/stuff/". First, the browser looks up the IP that dogstuff.com points to in the DNS, and gets, say 5.6.7.8. Then the browser sends a HTTP request to the server at 5.6.7.8, saying "I've requested dogstuff.com/stuff/, what do I get?". The webserver then takes the URL, dogstuff.com/stuff/, and decides, hmm, I think I'll return /www/stuff/index.html for that. So it sends that page back.Now, say you point catlady.com to 5.6.7.8 as well, and ask for catlady.com/stuff/. The same thing happens - the browser takes that, gets 5.6.7.8, and sends a request to that server. However, this time the server sees that you've requested something different - catlady.com/stuff/ instead of dogstuff.com/stuff/ - and decides, hmm, I think I'll send back /www/otherstuff/page.html instead. It's entirely up to the server.How do I tell my registrar what IP address to point my domain name to?The information about what IP addresses domain names resolve to is told by nameservers that sit on the server's domain (usually on ns* sudbdomains, e.g. ns1.mediatemple.net). When you buy a domain name, you tell the registrar what nameserver is should get IP resolution information from. So say you enter ns1.mediatemple.net into the NS information - the registrar's system will ask ns1.mediatemple.net, "what IP address should I point 'dogstuff.com' to?" And ns1.mediatemple.net will say, "5.6.7.8" (or whatever), and that's where the URL will go.
Link to comment
Share on other sites

Be careful what you mean by resolve - domain names can't resolve to one another, they can only resolve to IP addresses...
It occurs to me that when you buy a domain name i.e. dogstuff.com that is all you get: the name and the right to assign an IP address to it. I guess when you buy host space then you are finally buying an IP address? Then you go back to your domain name vendor and plug your new IP address into your account?
Link to comment
Share on other sites

Not exactly... when you buy host space, you buy a space on a certain computer (that has an IP address). Then you tell the host the name your site uses, so that when they get a request for your domain (which is part of the requests they'll be getting... see examples from Synook above), they know to serve your stuff.Additionally, most hosts have their own name servers in which they place the yourDomain-to-oneOfTheirIPs translation. They'll give you the names of those nameservers that you can then give to your domain register.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...