Domain name, host name and URL

What is a domain name?

google.com, baidu.com, 163.com 等.

Domain name, host name and URL examples


Example 1:

http://mail.163.com/index.html
1) HTTP: // : This is the protocol, HTTP is HyperText Transfer Protocol, which is the page in the online transmission protocol.
2) mail : This is the server name, on behalf of a mailbox server, so is the mail.
3) 163.com : This is the domain name is the unique name used to locate the site.
4) mail.163.com : This is the host name (website name), the server name + domain name components.
5) / : This is the root directory, that is, through the website to find the server name, and then stored in the root directory of the web server
6 :) index.html : This is the default page under the root directory (of course, the default is 163 pages I do not know this, but most of the default page is index.html)
7) http://mail.163.com/index.html : this is called URL, uniform resource locator, the global address for locate resources online.

Example 2:

163 the same as the domain name is 163.com, want to build a www server, so www.163.com. With
want the entire mailbox server, ok, mail.163.com have.

Example 3:

To http://www.sina.com.cn/ for example, http protocol is used for communication, sina.com.cn is the domain name, www is the name of the machine to provide services (server name), domain name is the server name + host name, that www.sina.com.cn is the host name. As another example, http: //blog.sina.com.cn/ in, blog blog is to provide services that machine's name, sina.com.cn is the domain name, blog.sina.com.cn is the host name.

The domain also graded, in order to reduce the level of forward from the back, sina.com.cn in, CN is the top-level domain, he said China, COM is the second-level domain, represents businesses (Commercial's), of the siNA is a third-level domain generally use their own first name.

Supplementary:
http://mail.163.com/index.html
which, index.html is the default page.
However, when we enter the URL, usually directly into
mail.163.com or www.baidu.com, why?

When we visit www.baidu.com, the browser will automatically help us add http: //, become http://www.baidu.com.

Baidu after the server receives the request, it will automatically add / into:
http://www.baidu.com/.

Baidu server looks for index.html or other default pages in the directory, which is Baidu's home page, after finding, through the http protocol back to you. That is, you see Baidu home page.

Guess you like

Origin www.cnblogs.com/ysx215/p/11390298.html