Describe the Functions, Components, and Types of URLs.
Uniform Resource Locator
A URL, or Uniform Resource Locator, specifies a unique address to a resource on the Internet. A resource can be a specific Web page, a document, or an image. URLs are occasionally called URIs, or Uniform Resource Identifiers.
Parts of a URL:
Delimiters separate the parts of a URL address.
The first part of a URL indicates which protocol to use; the second part specifies where the resource is located.
This can be a confusing point, but it is an important one. In a nutshell, using the Internet address https://www.cplusoop.com/, the Domain Name is cplusoop.com,
everything to the right of the
http://www.
The URL is everything including the https://www.cplusoop.com. You will be asked many times in for just the domain when registering or searching for domains. Other times, you will be asked for the full URL. It is important to understand the difference between these terms.
The service or protocol part of the URL identifies the types of internet service the browser uses to access the resources
The host name is used to identify web resources on HTTP servers. Host names are optional.
The subdomain name identifies the name of the server hosting the resources
The Domain name identifies the type of entity providing the resource.
The Port number designates the specific TCP/IP port being used to process the request and will default to 80 if it is omitted.
The Directory identifies the location of the resources on the host server.
Elements of a Uniform Resource Locator:
With Hypertext and HTTP, URL is one of the key concepts of the Web. It is the mechanism used by browsers to retrieve any published resource on the web. URL stands for Uniform Resource Locator and is nothing more than the address of a given unique resource on the Web. In theory, each valid URL points to a unique resource. Such resources can be an HTML page, a CSS document, an image, etc. In practice, there are some exceptions, the most common being a URL pointing to a resource that no longer exists or that has moved. As the resource represented by the URL and the URL itself are handled by the Web server, it is up to the owner of the web server to carefully manage that resource and its associated URL.
Uniform Resource Locator Definition:
So how does your favorite browser navigate this tangled network of computers to find just the web page you want? It’s all in what is known as the URL (Uniform Resource Locator), which is simply the website address you type into your browser, like www.seotrance.com
Protocol Description:
URL is the syntax and semantics for a compact string representation of a resource available via the Internet. For example, we use URL to locate web addresses and FTP site addresses. The generic syntax for URLs provides a framework for new schemes to be established using protocols other than those defined in this document. URLs are used to 'locate' resources, by providing an abstract identification of the resource location. Having located a resource, a system may perform a variety of operations on the resource, as might be characterized by such words as "access", "update", "replace", "find attributes". In general, only the "access" method needs to be specified for any URL scheme.
Types of URLs
A URL describes the location of a specific file on a specific computer connected to the Internet. There are three types of URLs based on where the files are located relative to the document. The table below describes the types of URLs and their general syntax.
Type
Description
Syntax
Relative
Address expressed relative to the originating document
Easy to move set of documents if the positions of the document relate to each other remain constant
Best used when files are related to one another and kept in proximity
directoryname/filename
Local absolute
Start at a fixed point and specify a fixed path to the file from that point
Best used for most links in which documents reside on the same server
/directoryname/filename
Fully qualified absolute
Defines the entire URL
Easiest to move
Best used when different servers are required
Must be changed whenever the server name changes
service://host-name.domain-name/path/file
In addition to the functions of URLs discussed so far, there are other uses for URLs.
When considering alternative applications for URLs on host computers, it generally means looking for tools or technologies that can serve as alternatives to traditional web hosting or methods of accessing web-based resources. Here are some of the best alternatives:
IP Addresses Directly:
Usage: Instead of using a URL, which typically includes a domain name, you can directly access a resource by its IP address. This bypasses the need for DNS (Domain Name System) lookup.
Example: Instead of using `http://example.com`, you might use `http://192.168.1.1` if the resource is hosted on that IP.
SSH (Secure Shell):
Usage: SSH allows secure access to a remote host, where you can execute commands, transfer files, or manage systems directly from a terminal or command line interface.
Example: Instead of accessing a website, you could use `ssh user@hostname` to manage the host directly.
File Sharing Services (FTP/SFTP):
Usage: File Transfer Protocol (FTP) or Secure File Transfer Protocol (SFTP) provides a way to upload, download, and manage files on a server without needing a URL to access a web interface.
Example: Accessing a file via `ftp://hostname/path/to/file` instead of via a URL.
Remote Desktop Protocol (RDP):
Usage: RDP allows you to remotely access and control a host computer's desktop environment. This can replace the need for URLs if you need direct interaction with the host machine.
Example: Using a remote desktop client to connect to `hostname` to manage resources on the server.
Peer-to-Peer (P2P) Networks:
Usage: P2P networks like BitTorrent allow for the sharing of files or data directly between users, bypassing the need for traditional URLs.
Example: Instead of downloading a file from a URL, you might use a torrent file or magnet link that connects you directly to peers who have the file.
Blockchain-Based DNS Alternatives (e.g., ENS, IPFS):
Usage: Decentralized alternatives to traditional DNS, like the Ethereum Name Service (ENS) or InterPlanetary File System (IPFS), can be used to resolve content or addresses without relying on traditional URLs.
Example: Accessing resources using a .eth domain name via ENS or retrieving content using an IPFS hash.
Direct Socket Connections:
Usage: Establishing a direct TCP or UDP socket connection to a server can be an alternative to accessing web services via URLs.
Example: Applications like custom game servers or chat clients often connect to a server using a socket instead of a URL.
Localhost Access:
Usage: If the application or service is hosted on your local machine, you can access it directly via `localhost` or `127.0.0.1`, often bypassing the need for a full URL.
Example: Accessing a development server running on your local machine via `http://localhost:8080`.
Direct Application Protocols:
Usage: Instead of using HTTP(S) via a browser, you can interact with host services using alternative protocols specific to the application, like SMTP for email or MQTT for IoT devices.
Example: Sending an email via `smtp://hostname` instead of accessing an email client through a URL.
Custom VPN Solutions:
Usage: Virtual Private Networks (VPNs) can allow secure and private access to resources on a network, often without the need for traditional web URLs.
Example: Using a VPN to connect to a private network where you can access shared resources directly by their network address.
Mobile or Desktop Applications:
Usage: Instead of accessing a service through a web URL, you could use a dedicated application that interacts with the host via APIs or direct network communication.
Example: A desktop app for email, chat, or file management that connects directly to a server without needing a web browser.
These alternatives offer different ways to access, manage, and interact with host computers or resources without relying solely on traditional URLs and web browsers. The choice of alternative depends on the specific use case, security requirements, and the type of resources being accessed.
Various Applications for Uniform Resource Locators
Uniform Resource Locators (URLs) are most commonly used to identify resources on the World Wide Web (WWW) and specify how to access them. Some common applications of URLs include:
Web Browsing: URLs are used to access and display web pages through a web browser.
File Downloads: URLs can be used to download files such as images, videos, and documents from the internet.
Online Services: URLs are used to access online services like email, cloud storage, and social media platforms.
Online Shopping: URLs can be used to access online shopping websites and purchase products or services.
Streaming Media: URLs can be used to stream music, videos, and other types of media from online platforms.
Search Engines: URLs are used to search for information on the internet using search engines like Google, Bing, and Yahoo.
Database Access: URLs can be used to access databases and retrieve information from them.
Application Programming Interfaces (APIs): URLs can be used to access APIs, which provide programmatic access to data and services on the internet.
Deep Linking: URLs can be used to link directly to specific pages or content within a website, making it easier for users to find what they're looking for.
Overall, URLs play a crucial role in accessing and organizing the vast amount of information and resources available on the internet.
Other uses for URLs:
URLs can make requests of host computers. For example, the URL cplusoop.com is a request for the computer named www in the domain cplusoop.com to run a program. This type of URL is used for building interactive Web sites using CGI scripts and other programming techniques. A uniform resource locator (abbreviated URL; also known as a web address) is a specific character string that constitutes a reference to a resource. Most web browsers display the URL of a web page above the page in an address bar. A URL implies the means to access an indicated resource, which is not true of every URI. URLs occur most commonly to reference web pages (http), but can also have a role in
file transfer (ftp),
email (mailto),
database access (JDBC),
and many other applications (see URI scheme for a list).
Port Numbers
There are two kinds of ports on a computer, hardware and software ports. Hardware ports identify a particular device. Software ports identify the first instruction of a program used to handle common routines, such as a modem request. Ports are identified by a number (possibly hexidecimal, so they may also contain letters).
You may recall in our URL MouseOver above, that software port numbers identify the sending and receiving application. Over the years, a PC or Macintosh have software ports that are typically assigned values of 256 or less. Ports numbered from 256 to1024 are assigned to services developed as part of the UNIX operating system. The table below identifies the port numbers for common Internet services. Recalling the port number in our MouseOver as 80, what service does this designate?
Internet Services and their Port Numbers
Service
Port Number
File Transfer Protocol
21
Telnet
23
(SMTP) Simple Mail Transfer Protocol
25
Gopher
70
Finger
79
HTTP: Hypertext Trasnfer Protocol
80
Network News Transfer Protocol
119
Secure Hypertext Transfer Protocol
443
MS SQL Server
1443
Internet Services Port Numbers
Click the link below to review what you have learned about port numbers related to common Internet services.
Some Internet Services and their Port Numbers
File Transfer Protocol: 21
Simple Mail Transfer Protocol: 25
Hypertext Transfer Protocol: 80
Network News Transfer Protocol: 119
Secure Hypertext Transfer Protocol: 443
MS SQL Server: 1443
Gopher: 70
Telnet: 23
Gopher Protocol :Port 70
Port 70 is the default port used for the Gopher protocol, which was a precursor to the World Wide Web. Gopher was a text-based protocol that allowed users to access and navigate content on remote servers.
While the Gopher protocol is no longer widely used, there are still a few Gopher servers and clients in operation today. However, the use of Port 70 for Gopher is relatively rare, as most modern web browsers do not support the protocol by default.
In recent years, there has been some interest in reviving the Gopher protocol as a lightweight and privacy-focused alternative to the modern web. However, it remains to be seen whether this will result in a significant increase in the use of Port 70 or the Gopher protocol more broadly.
In summary, while Port 70 for Gopher is still in use today, its usage is relatively rare and limited to a small number of servers and clients. The protocol is no longer widely used, and most modern web browsers do not support it by default.
Communication Channels
The communication channel provides the path for the message between the two communicating nodes in the model. Although the model in Figure 4-11 represents the channel as a direct point-to-point connection between the nodes, this is not generally the case.
In reality, the channel can take many different forms. In the simplest case, it might be a direct connection between nodes in a local area network. More typically, the communication channel is actually divided into segments, called links, with intermediate nodes between the links that forward packets from one link to the next. Data originates at one end point and passes through each link to reach the destination end point. As an example, consider Figure 4-12. In this example, data in the form of a http request originating from a home computer connects wirelessly through a router to a DSL modem. From there, the data passes through the DSL link to an Internet Service Provider, then through many additional connections to a computer somewhere on the Internet.
Data Processing (computers) versus Data Communications
The computer communications revolution has produced several remarkable facts:
There is no fundamental difference between data processing (computers) and data communications (transmission and switching equipment).
There are no fundamental differences among data, voice, and video communications.
The distinction among single-processor computer, multiprocessor computer, local network, metropolitan network, and long-haul network has blurred.
In other words, the communication channel between your web browser and the web server on the Internet may be divided into many links, each with its own characteristics. This is true in general of most communication channel connections. Conversely, there may be many nodes sharing the use of a single channel or channel link. Thus, a channel or channel link may be required to carry several messages from different sources and bound for different destinations simultaneously. The requirements for data communication must include the ability to share the channel elements among many different sender-receiver pairs and to direct messages to their correct nodes, wherever those nodes might be located. One way to view the channel is to consider the connection between the end point sender-receiver pair as the communication channel for that pair. If our prime objective is to consider the overall characteristics of the channel as a conduit for messages being sent between that pair, this view may be useful and sufficient. We noted in the previous paragraph, however, that the channel between two end points may actually consist of a number of links, with intermediate nodes connecting the links. Each link has its own characteristics of interest and in a limited sense, each link can also be described as a communication channel.
Since the channel may be made up of multiple links, the interfaces at each end of the connection may differ from each other and the characteristics of the end-to-end channel may differ from those of the individual links. For example,
the computer initiating a message might be connected to a network using a telephone modem, which transmits messages one byte at a time using audio tones as a signaling method. The receiving computer might be connected to the network using Ethernet, which expects messages formatted as digital packets consisting of many bytes of data, together with additional bytes that define the specific characteristics of the particular packet.
There are protocols and standards that define the makeup of the packets. The network must be capable of converting the message from one format to another at the intermediate nodes when required.