What is a domain name?

What is a domain name? What name of the website? What is a URL?
What is a domain name? Actually, there are too many domain names to use, but do you understand the detailed meaning of domain names? Do you know what the domain name is? Next, Xiaobian will take you through the meaning of the domain name.


Domain name, I believe that everyone is not the default, and has been used countless times! For example:

Google.com, baidu.com, 163.com, etc.

At this time, you may need to ask yourself why Xiaobian did not add www to the front.

Because under normal circumstances, should not it be www.baidu.com and the like?


Here, Xiaobian can tell you clearly, in addition to www, it is no longer a domain name!
Let's analyze the following paragraph:

Http://mail.163.com/index.html

1) http: //: This is the protocol, which is the HTTP hypertext transfer protocol, which is the protocol for web pages to be transmitted over the Internet.

2) mail: This is the name of the server, which represents a mailbox server, so it is mail.

3) 163.com: this is a domain name, a unique name used to locate a website.

4) mail.163.com: this is the name of the website, which consists of the name of the server + the name of the domain.

5) /: This is the root directory, that is, the server is found by the name of the website and then the root directory of the web page is stored on the server.

6 :) index.html: this is the default page in the root directory (of course, the default page of 163 I do not know, but most of the default pages 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.

Maybe at this time, you still do not understand, what is the difference between this domain name and the name of the website?

Ok, Xiaobian I'll tell you!

For example, you bought a university whose name is myname.com.

So, you want to establish a language department, that's how the liberal arts building was established, called yuwen.myname.com

Then, you want to build a math department, OK, shuxue.myname.com was established.

Like 163, your domain name is 163.com, you want to build a www server, so you have www.163.com.

He wants to play again on the mailbox server, so mail.163.com has it too.

Well, I just mentioned:

Http://mail.163.com/index.html

Among them, index.html is the default web page.

However, when we enter the URL, we usually enter it directly.

Mail.163.com or www.baidu.com, why is this?

Then look down.

Keep in mind that we can not only access the files, but also the directories.

For example:

Http://www.163.com/

This means accessing the current root directory /.

If you do not know what the root directory is, check Baidu. I will not enter here.

At this point, the web server will check if it has this directory, OK, definitely. So, will the server return the full directory? Do not!

The server will search the default web page in its own directory, usually index.html, of course, you can modify it by configuring the web page. Xiaobian built Apache under LINUX, there are specifically modified configuration files, you can also try it.

After that, the server finds the index.html in the directory and returns it to the web browser.

Therefore, when we visit www.baidu.com, the browser will automatically add http: // to us and it will become http://www.baidu.com.

And the Baidu server, after receiving the request, will automatically add /, it will become:

Http://www.baidu.com/

Then, the Baidu server will search for index.html or other default web pages in this directory, which is the Baidu home page. Once it is found, it will be returned through the http protocol. That's the Baidu home page that you saw.

Finally, a great introduction to a book, the HTML books of HeadFirst, is very useful for beginners. If you want to learn a web page.
What is a domain name? What is a domain name?  Reviewed by eft on 3:56:00 p.m. Rating: 5

About