Domain name, I believe we are not the default, has been used countless times! Like what:
Google.com, baidu.com, 163.com and so on.
At this point, you may be wondering why the little one didn't add www in front of it?
Because under normal circumstances, shouldn't it be www.baidu.com or something like that?
Here, small series can be clear to tell you, plus www, it is no longer a domain name!
Let's take a look at the following paragraph:
Http://mail.163.com/index.html
1)/http: This is the protocol, the HTTP Hypertext Transfer Protocol, which is the protocol that the Web page transmits on the Internet.
2) Mail: This is the server name, which represents a mailbox server, so it is mail.
3) 163.com: This is the domain name, is used to locate the unique name of the site.
4) Mail.163.com: This is the site name, consisting of the server name + domain name.
5)/: This is the root directory, that is, to find the server through the site name, and then the server to store the root directory of the Web page
6:) Index.html: This is the root directory of the default page (of course, 163 of the default page is not this I do not know, just the majority of the default page, are index.html)
7) Http://mail.163.com/index.html: This is called URL, Uniform Resource Locator, global address, used to locate resources on the Internet.
Perhaps by this time, you still do not understand, this domain name and site name What is the difference?
OK, small to tell you!
For example, you bought a university, the name of the University is: myname.com.
Then, you want to build a language department, so, the Arts building was established, called yuwen.myname.com
Then you want to set up a math department, ok,shuxue.myname.com.
Like 1631, his domain is 163.com, he wants to build a WWW server, so there is www.163.com.
He wants to play the mailbox server again, so mail.163.com also has.
This way, do you understand?
So, just mentioned:
Http://mail.163.com/index.html
Where index.html is the default Web page.
However, when we enter the URL, it is generally a direct input
Mail.163.com or www.baidu.com, why is that?
Then look down.
You know, we can not only access the file, but also access the directory.
Like what:
http://www.163.com/
Access to the current root directory/.
If you do not understand what root directory, please Baidu check, here is unknown said.
At this point, the Web server will see if you have this directory, OK, sure. So, does the server return the entire directory to you? No!
The server will be in its own directory to find the default Web page, generally index.html, of course, you can configure the page to modify. Small in Linux under the construction of Apache, there are configuration files specifically modified, you can also try.
After that, the server finds the index.html in the directory and returns it to the Web browser.
So, when we visit www.baidu.com, the browser will automatically help us add http://to become http://www.baidu.com.
And Baidu's server, after receiving the request, will automatically add/, into:
http://www.baidu.com/.
Then, Baidu server will look for index.html or other default page in this directory, that is, Baidu's homepage, found after the HTTP protocol to return to you. This is the Baidu homepage you see.