知识库 知识库
首页
  • Hyperskill - Java

    • Java basic
    • Java OOP
    • 应知
    • 扩展
    • IO & Stream
    • Error & Exception
    • Algorithm & Data structure
    • Design pattern
    • Web
    • Spring boot
  • 练习题

    • 选择题 & 填空题
    • 代码题
  • Frank - Java与生活 (OOP)

    • 参考资料
    • Java基础
    • OOP上半部分
    • OOP下半部分
  • Frank - Java API进阶

    • Base API
    • Unit Test and main function
  • 学习笔记
  • 学习笔记

    • 数据库
  • Frank - MySQL删库跑路

    • 安装、连接、配置
    • 基本操作——数据库
    • 基本操作——表
    • 基本操作——数据
    • 数据类型
    • 列属性完整性
    • 数据库设计思维
    • 单表查询
    • 多表查询
  • 学习笔记

    • 其它
  • Frank - Linux现代方法

    • 必知
    • 命令
    • 技巧
  • 技术文档
  • Git
  • GitHub技巧
  • 前端
  • Khan Academy - 语法
  • Monthly
  • 阅读
  • Others
  • 学习
  • 面试
  • 心情杂货
  • 实用技巧
  • 友情链接
收藏
  • 标签
  • 归档
GitHub (opens new window)

Jim FuckPPT

Java小学生
首页
  • Hyperskill - Java

    • Java basic
    • Java OOP
    • 应知
    • 扩展
    • IO & Stream
    • Error & Exception
    • Algorithm & Data structure
    • Design pattern
    • Web
    • Spring boot
  • 练习题

    • 选择题 & 填空题
    • 代码题
  • Frank - Java与生活 (OOP)

    • 参考资料
    • Java基础
    • OOP上半部分
    • OOP下半部分
  • Frank - Java API进阶

    • Base API
    • Unit Test and main function
  • 学习笔记
  • 学习笔记

    • 数据库
  • Frank - MySQL删库跑路

    • 安装、连接、配置
    • 基本操作——数据库
    • 基本操作——表
    • 基本操作——数据
    • 数据类型
    • 列属性完整性
    • 数据库设计思维
    • 单表查询
    • 多表查询
  • 学习笔记

    • 其它
  • Frank - Linux现代方法

    • 必知
    • 命令
    • 技巧
  • 技术文档
  • Git
  • GitHub技巧
  • 前端
  • Khan Academy - 语法
  • Monthly
  • 阅读
  • Others
  • 学习
  • 面试
  • 心情杂货
  • 实用技巧
  • 友情链接
收藏
  • 标签
  • 归档
GitHub (opens new window)
  • Hyperskill - Java

    • Java basic

    • Java OOP

    • 应知

    • 扩展

    • IO & Stream

    • Error & Exception

    • Algorithm & Data structure

    • Design pattern

    • Web

      • Theory:World Wide Web
      • Theory:HTTP
      • Theory:HTTP URL
      • Theory:HTTP messages
      • Theory:MVC
      • Theory:Introduction to Spring Web MVC
      • Theory:REST
      • Theory:Postman
      • Theory:Getting data from REST
      • Theory:Posting and deleting data via REST
      • Theory:REST Exception handling
      • Theory:Handling requests with bodies
      • Theory:Domains
        • Domain name structure
        • Root domain
        • Top-level domain
        • Second-level domain
        • Third-level domain
        • Localhost
        • Conclusion
      • Theory:HTTP Basic Auth
      • Theory:IP
      • Theory:Authentication and Authorization
      • Theory:OAuth
      • Theory:Java 11 HTTP client
    • Spring boot

  • 练习题

  • Frank - Java与生活

  • Frank - Java API进阶

  • 学习笔记

  • Java
  • Hyperskill - Java
  • Web
Jim
2022-08-01
目录

Theory:Domains

Imagine how inconvenient it would be to communicate if people addressed each other not by name but by a numerical value corresponding to their birthday or phone number. If there were no names, people would definitely try to come up with them.

When a computer connects to the Internet, it is assigned a unique number called IP Address. Each web resource also has one. For example, let's look at the address 74.125.131.113. If you write it in the address bar, the browser will open the site of the search engine Google. Unless you have a phenomenal memory, it is way too difficult to remember long numeric values to visit several sites, which is why domain names were invented. It's much easier to write google.com instead of a long set of numbers. The domain name acts as a unique name on the Internet and is a more straightforward and more human-friendly way of recording IP addresses.

All information about domain names is stored in a distributed database of DNS (Domain Name System), which is a network of computers scattered around the world.

# Domain name structure

Domains are arranged hierarchically: they consist of levels. The hierarchical structure allows the browser to quickly find and open the site. By default, each domain consists of two levels, but there can be more levels (three, four, etc).

img

Let's take a closer look at domains placed from the root to the third level.

# Root domain

The root domain, or the top (zero) level domain, is marked with a dot. In common use, the dot is not displayed as part of the domain name.

img

You can skip the root domain because it does not interfere with access to the site.

# Top-level domain

The top-level domains are divided into national domain names and public domains.

The first group defines the region of the site and its geographical location: .us for the United States and .eu for the European Union.

The second group does not reflect the geographical characteristics of the resource, but rather its affiliation to a particular field. For example, an information site will have an .info endpoint, a commercial site will have .com, and a non-profit site will have .org.

img

There are some more specific domains. The domain .net (from the network) was originally intended for network technology organizations. For example, Internet service providers. The domain .edu is used by the US-affiliated institutions of higher education.

提示

Today the domains .com, .org and .net are used with almost no restrictions. You can find any type of organization registered under these domain names. But the .edu domain remains very restricted in use.

# Second-level domain

The second-level domain is a unique website address that people remember and use for surfing the Internet like google, facebook, uber, and others.

img

This domain name can be taken when registering with registrars on the Internet. It is worth remembering that you can use this resource only for a certain period of time, which is usually about a year. To use this part of the name, you have to annually renew the application for hosting.

# Third-level domain

Third-level names are available to register resources with second-level domain name companies. The owner of a third-level domain has the ability to create multiple resources at once on the site with a common domain name. For example, if the site is called google.com, the news blog will be news.google.com .

img

提示

Not all organizations use third-level domains since it's not the only way to organize the resources.

We will not consider deeper domain levels (4th, 5th, etc), but they can also exist on the Internet. We hope the presented information is enough for practice and the successful completion of the interviews.

# Localhost

You may have the last question, how you can refer to your own computer in the network by name? The common alias for this purpose is the localhost. Localhost is the hostname that refers to the computer you're working on. Localhost is also a reserved top-level domain for DNS, but its only purpose is to access the current machine only.

提示

Besides localhost, you can set other aliases to access the current computer or even sites like Hyperskill in host files: on Unix at /etc/hosts and on Windows at C:\Windows\System32\driver\etc\hosts. Beware, this information can be used by malware because it allows redirecting you from goodsite.com to evilsite.com by modifying your host files.

Addresses from 127.0.0.0 to 127.255.255.255 are reserved for localhosts. In a network that consists of a single PC; meaning on your machine, localhost is located at the address 127.0.0.1. When you enter this address or a localhost into your browser's address bar, you will be automatically rerouted to your machine. The most common usage of this process is to run and test web services in a local environment. This allows developers to simulate an internet connection, maintaining security and speed.

# Conclusion

In summary, domain names are kind of labels associated with a specific IP address and saved in distributed databases of DNS. Domain names consist of hierarchical levels, at least two. That way it is easier for a browser to find a specific website. Those two basic levels are a top-level domain like .eu or .com, and a second-level domain - an exclusive website name like google or uber. Also, don't forget that localhost in the network refers to the computer you're working on.

编辑 (opens new window)
#Web
上次更新: 2022/10/12, 17:01:25
Theory:Handling requests with bodies
Theory:HTTP Basic Auth

← Theory:Handling requests with bodies Theory:HTTP Basic Auth→

最近更新
01
《挪威的森林》
04-14
02
青钢影
04-14
03
Processing strings
02-18
更多文章>
Theme by Vdoing | Copyright © 2022-2023 Jim Frank | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式