Jump to content
xisto Community
nightfox1405241487

What Is Dns And How Does Dns Work?

Recommended Posts

Here is one thing that has confused me since I got my own domain.

What is DNS and how does it work?

I know that DNS takes text (mydomain.com) and sets it up with an IP address. Well, one account that I pay for is on a shared server. When I bought my hosting, I was given two Name Server URLs, NS5.Myhost.com and NS6.Myhost.com. All I had to do was log into GoDaddy and put those name server listings into my domain settings and wait 24-48 hours (cjb.net takes about 15-30 minutes).

Here's what confuses me. On the server, my account is home/myaccount/public_html/ how exactly does my domain know to point to that path and not someone elses??? While I was waiting for my domain to update, I was given a temporary address of http://forums.xisto.com/no_longer_exists/
Then when my domain worked, all the files were still there, just accessable from my domain!

Shared hosting is the biggest thing that confuses me. Like Xisto is shared hosting (right?). We're all squeesed together on a server and a community (so to speak). So how does Apache know that the website I have hosted here is in home/myaccount/public_html/? I have installed Apache on my Windows machine, and all I know is that I can set the server root to be in C:\WWW if I wanted it to. So how does Apache know that there are lots of directories to look in? Man! The webhosting business is complicated stuff!

[N]F

Edited by microscopic^earthling (see edit history)

Share this post


Link to post
Share on other sites

There are many different ways in which networks work. I believe that Xisto assigns a different static ip address to each site, but I'm not sure. Either way, here is how the basic idea works:1) You point your domain to the nameserver, this name server is a DNS.2) You must also tell the company running the nameserver what your domain is, for example, with Xisto when setting up an account, you must tell them your domain.3) When the namesevrer receives your domain, it checks on which local ip address that domain is supposed to point to, this is why informing your host company is important.4) A router/switch directs the query to the proper machine on the local server.That is a very oversimplified explanation, if you want more in depth info, either post here or talk to ICANN.ICANN is the organization in charge of all domain name registration and ip address assigning.~Viz

Share this post


Link to post
Share on other sites

Hmmm, exactly what walker said.But if you didn't understand that, and from what I've gathered.On shared hosting there is one IP address which points to the main website of the shared hosting.For example, Xisto's IP address poitns to Xisto.com even though it uses that ip address for everywebsite.The way dns works for shared hosting is that you get the nameserver (which is unique for each account registered at a set webhost). And that nameserver points to the directory where your webhosting account is located.So for Xisto. We all share one IP address. But each name server points to a different area mapped out on that IP. That's why you must provide your webhost and your nameserver when you buy a domain name.This is only what I've understood from the matter and from semi personal expiriences.Hope it helps. Sorry if I'm wrong.

Share this post


Link to post
Share on other sites

Actually - as far as I know - instead of having the nameserver pointing to different folders - the redirection happens to different PORTS on the same IP... that's how it's supposed to work out in most cases. These ports lead straight to your public_html - which is set at Apache's DocumentRoot ... so irrespective of whose home drive it is, apache will always look for a public_html and try and load the index.php/html in it.

Share this post


Link to post
Share on other sites

Ah, I am starting to get it! So like I have hosting here (with a cjb.net domain because I don't have enough money for a TLD :lol:) and I have the DNS set to ns2.astahost.com. I am a little confused by what spacewaste said. If what spacewaste said was true, wouldn't there be THOUSANDS of Xisto.com name servers?And also, if you do a whois lookup on Xisto.com, it's name servers are also pointed to ns1.astahost.com and ns2.astahost.com. If you have to wait about 24 hours for the DNS to update for a domain, how could Xisto.com ever get updated??? All I can say is that I get everything else on web hosting. It is just the name server part that gets me lost!

Share this post


Link to post
Share on other sites

spacewaste was almost correct. It isn't thousands of nameservers, but thousands of PORTS (as m^e said) on each nameserver, so really only one server is required. ThHere are over 5000 usable ports for a nameserver.~Viz

Share this post


Link to post
Share on other sites

DNS, stands for " Domain Name System" and helps resolving names to IP numbers as it is much easier for people to remember logical names rather then a 12 digit number.DNS uses 3 major components ”Resolvers (client)”, Name Servers” and ”Domain Name Space”. In basic DNS communication a client (Resolver) sends a query to a Name Server, which returns with the requested information, or an address for another Name Server, an error message is received if the query gives no results

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.