📜  域名和URL之间的区别

📅  最后修改于: 2021-06-28 08:13:39             🧑  作者: Mango

在互联网和网站的世界中,域名和URL是非常通用的术语,并且可以互换使用,但是这两个术语存在很多差异。在本文中,我们将学习域名和URL之间的区别。

1.域名
很难记住服务器的IP地址。因此,域名是IP地址的文本形式,它更加人性化且易于学习。它是URL的一部分,主要用于组织品牌。域名的所有部分均由句点或点分隔。域名的一个示例是www.geeksforgeeks.org。域名可以分为以下几部分。

服务器类型: www或万维网代表Web服务器。

主机名:通常是域名的主要名称,例如google,geeksforgeeks等。

顶级域名:域名的最后一部分是顶级域名。例如.com,.in,.au等。

2.统一资源定位符
统一资源定位器称为URL。它是一个字符串,提供了网页的完整地址,即,也称为网址。为了访问特定网站,您只需要在搜索栏中输入URL即可找到该网站。例如,Google主页的网址为https://www.google.com/。 URL可以分为不同的部分。

方法或协议:这是用于从服务器检索文件的方法或协议。

主机名:也称为域名或文件或文档所在服务器IP地址的人性化文本格式。

端口:这只是一个协议号。它只是一个通信端点。

路径:这是文件在服务器上的位置。

域名和URL之间的区别:

S. No. Domain Name Uniform Resource Locator
1. The main motive of the domain name is to make it easier to access a website. They are more used as a brand and are usually referred to as a brand name. If you want to find a particular website URL is best for it because a URL is a complete web address to find a particular website.
2. A domain name is a human-friendly text form of the IP address. URL is a string that represents the complete web address of any web page.
3. It is the part of the URL that is more human friendly. It is the string that represents a complete web address that contains the domain name.
4. It contains three parts Top Level Domain, Intermediate Level, and the Low Level. It also contains the following parts’ method, protocol, hostname, port, and path of the file.
5. Example: geeksforgeeks.org Example: https://www.geeksforgeeks.org/