URLS, DNS & Address resolution
Introduction to URLs
A Uniform Resource Locator, is a web address that identifies a resource on the internet. URLs are used to specify the location of web pages, files, and other resources on the World Wide Web.
URLs are crucial for navigating and accessing resources on the internet. They provide a standardized way to specify the location of web pages, files, and other online content, allowing users and web browsers to retrieve and display the requested information.
What does the acronym URL stand for?
URL Components
An URL consists of several components that provide information about how to access the resource.
https://blog.example.com:8080/path/to/page.html?search=query&sort=asc#section2
Component parts include:
Scheme: https://
Subdomain: blog.
Domain: example
TLD: com
Port: :8080
Path: /path/to/page.html
Query string: ?search=query&sort=asc
Fragment: #section2
Which part of a URL indicates the protocol used to access the resource?
URL Schemes
https:// ftp://
URL schemes are prefixes or protocols that indicate how a resource should be accessed or which application should handle a particular type of URL. Each scheme is associated with a specific protocol or action.
Common schemes:
- http://: Hypertext Transfer Protocol (HTTP) for accessing web pages.
- https://: Secure HTTP, using encryption for secure web browsing.
- ftp://: File Transfer Protocol for transferring files over the internet.
- mailto:: Opens the default email client to send an email.
- tel:: Initiates a phone call (used on mobile devices).
- file://: Accesses local files on the user's device.
- spotify:: Opens the Spotify music streaming app.
- app:: Opens a specific mobile app on a device (custom schemes defined by app developers).
When you click on a URL with a particular scheme, your device or browser knows how to handle it based on the scheme definition.
What does HTTP stand for?
Subdomains
mail.example.com shop.example.com api.example.com
Subdomain is a part of a larger domain name within the Domain Name System (DNS) hierarchy. Subdomains are used to organize and categorize websites or resources within a domain.
For instance Google use subdomains for their different products:
- mail.google.com
- drive.google.com
- news.google.com
The most common domain is www, however many websites now use a naked domain without any subdomain prefix.
Domain Name
facebook.com gmail.com
A domain name, is a human-readable and memorable address used to access websites and resources on the internet. It provides a way for users to locate and identify specific websites without needing to remember complex numerical IP.
A website owner chooses their own domain name and then purchases a lease for the domain for a domain name provider, such as 123reg.com.
When user types in a domain name into a web browser the domain name needs to be translated into an IP address before packets can be sent across the internet. This is done through the Domain Name Service system.
Top Level Domains
.co.uk .edu .com
A top-level domain (TLD) is the highest level of the hierarchical domain name system (DNS) and is found at the rightmost part of a domain name. It's the portion of the domain that follows the last dot (period) in the domain name.
TLDs serve various purposes and can be categorized into different types.
Generic Top-Level Domains (gTLDs)
.com: Commercial, widely used for all types of websites.
.org: Organizations, often used by non-profits.
.edu: Educational institutions, such as universities and colleges.
.app: For applications and software.
.blog: For blogs and bloggers.
Country Code Top-Level Domains (ccTLDs)
.us: United States.
.uk: United Kingdom.
.jp: Japan.
Sponsored Top-Level Domains (sTLDs)
.gov: Restricted to U.S. government entities.
.edu: Restricted to educational institutions.
.travel: For the travel and tourism industry.
URL Ports
http://example.com:8080/page
A port is a numeric identifier used to specify a particular endpoint or communication channel on a networked computer. The port number helps direct network traffic to the appropriate service or application running on the server.
Many network protocols, such as HTTP (used for web browsing) and FTP (used for file transfers), have default port numbers associated with them. For example, HTTP typically uses port 80, while HTTPS (secure HTTP) uses port 443. This means that the user doesn't need to type in the port when typing in the web address.
What is the purpose of a port number in a URL?
What is the default port number for HTTP?
URL Path
/content/images/cat.jpg
The path component in a URL (Uniform Resource Locator) specifies the location of a specific resource or file on the web server. The path component is used to navigate to a particular directory or file within the website's directory structure.
Which of the following is not a valid URL path segment?
URL Parameters
q=keywords&page=1
URL parameters, also known as query parameters or query strings, are used to pass data to a web server or to modify the behavior of a web page. They are typically added to the end of a URL following a question mark ? and are composed of key-value pairs separated by ampersands &.
Example
https://example.com/search?q=keywords&page=1
Here the parameters are used to specify that we want to search for "keywords" and view page 1 of the search result.
URL Fragments
#section2
URL fragments, also known as anchor fragments, are used to identify a specific section or anchor point within a web page. They are indicated by a hash symbol # followed by a fragment identifier.
For example:
https://example.com/page#section2
Fragment uses
- Creating in-page navigation within long articles or documents.
- Linking to specific sections or content within a single web page.
- Enhancing user experience by allowing users to jump to relevant content.
What is the purpose of a URL fragment in a web address?
Which symbol is used to separate the URL fragment from the rest of the URL?
Domain Name System
The Domain Name System (DNS), is a crucial component of the internet that facilitates the user-friendly access to websites and resources. It serves as a system for translating human-readable domain names into numerical IP (Internet Protocol) addresses, which are used to locate and connect to devices on the internet.
What does DNS stand for in networking?
What is the primary function of DNS in networking?
How DNS Works
DNS works through a distributed network of DNS servers. When you enter a domain name into a web browser or application, the following steps occur:
- Your device queries a DNS resolver (often provided by your ISP or network) to resolve the domain name.
- The resolver checks its cache to see if it already knows the IP address for the domain. If not, it contacts a root DNS server.
- The root server directs the resolver to the appropriate top-level domain (TLD) server (e.g., ".com" or ".org").
- The TLD server, in turn, directs the resolver to the authoritative DNS server for the specific domain.
- The authoritative server provides the IP address for the domain, which the resolver returns to your device.
- Your device can then establish a connection to the web server associated with that IP address.
What is an authoritative DNS server?
Review: Fill in the Blanks
The , or Domain Name System, plays a crucial role in this process. It is responsible for translating human-readable domain names into machine-readable es. This process is known as . For example, when a user enters a domain name like "example.com" into their browser, the DNS resolves it to the corresponding IP address, such as "192.0.2.1".
Domains are organized in a hierarchical structure. At the top of this is the , which contains the records for all top-level domains (TLDs) like ".com," ".org," or ".net." Below the TLDs are the domain names themselves, which can be further subdivided into s. A subdomain is a prefix to the main domain, such as "blog.example.com" or "shop.example.com." Each subdomain can have its own set of records, called Resource Records, specifying details like IP addresses or mail servers.
The domain name also includes a name]], which identifies a specific host within a domain. A host can refer to a web server, email server, or any other networked device accessible through a network. For instance, in the URL "https://www.example.com," the hostname is "www."
s are systems responsible for querying and retrieving DNS information. When a user enters a URL into their browser, the resolver sends a request to the DNS to obtain the IP address associated with the domain name. Once the resolver receives the response, the browser can establish a connection with the specific web server.
is a process that ensures special characters in a URL are properly represented for transmission over the internet. Special characters, such as spaces or symbols, are encoded using specific characters or sequences to prevent interpretation issues.
The refers to the immediate superior domain in the hierarchical structure of a fully qualified domain name (FQDN). For example, in "blog.example.com," the parent domain is "example.com." The is an organization where users can register and manage their domain names, ensuring uniqueness and ownership.
Complete! Ready to test your knowledge?
URLs
- Introduction to URLs
- URL Components
- URL Schemes
- Subdomains
- Domain Name
- Top Level Domains
- URL Ports
- URL Path
- URL Parameters
- URL Fragments
Domain Name System
- Domain Name System
- How DNS Works