Web Address Explained – What Exactly Is a URL?
A web address or URL is a website's specific location on the web.
In other words, a URL (Uniform Resource Locator) is a text string that specifies the location of webpages, images, or videos, on the internet.
https://www.codesweetly.com is CodeSweetly's web address.
A web address is made up of eight parts:
- Domain name
- Top-level domain
- File path
Let's discuss each part of a web address.
A subdomain is a subset of a specific website. It allows you to categorize your website into one or more sections.
Although most people use
www as their website's primary section, it is not compulsory to use
www in URLs as it serves no technical purpose.
In other words, you can choose to use
www as a secondary domain while using
news, or the likes as your primary domain.
Alternatively, you can create your domain without using
Irrespective of your choice between a
www and non-
www URL, it's best to choose one and stick with it. By so doing, your web address will appear consistent to your users and search engines.
After you've chosen a
www or non-
www URL, remember to redirect the other type.
So, for instance, if you've chosen to use
www URLs, configure your server to redirect all non-
www requests to their
A redirect is necessary because you can't predict the URL your users will use.
A domain name is a website's name. It is an essential part of a website that helps users remember a website.
In other words, a domain name is what comes after
@ in an email address. Or what follows
www. in a web address.
So, for instance,
codesweetly is the domain name in
Keep in mind that a domain name is a human-friendly version of an IP address.
As an example,
22.214.171.124 is the IP address for
In other words, suppose you type
www.google.com into your browser. In that case, the computer will convert the URL to a
126.96.36.199 IP address via a Domain Name System (DNS).
But why convert domain names to IP addresses?
Keep in mind that humans find it much easier to remember names than numbers. However, computers work best with digits.
Therefore, converting domain names to IP addresses and vice versa enables fluent communication between humans and computers.
In other words, the domain name system helps computers to quickly locate the specific resource (e.g., website) humans want it to get. While also allowing people to use computers with ease.
So, how exactly does a Domain Name System work?
Suppose you enter a domain name into your browser. DNS will search its domain name servers for the IP address corresponding to the queried website name.
If a matching IP address gets found, DNS will:
- Convert the domain name to the matched IP address.
- Send your browser helpful information about the IP address.
Keep in mind that the data your web browser will receive includes:
- The domain name's IP address, and
- The current nameservers of the website's host—which contains the host's IP address.
Those data will help your browser locate and retrieve your request from the server hosting the resource you requested.
Therefore, consider DNS as an essential translator that translates a human-friendly address (e.g.,
www.codesweetly.com) to the equivalent computer-friendly address (e.g.,
So, what exactly is the difference between a domain name, domain name system, and DNS server? Let's find out.
Domain Name vs. Domain Name System vs. DNS Server
A Domain Name is a website's name.
A Domain Name System (DNS) is how domain names get converted to their equivalent IP addresses.
And a DNS Server is a computer used to store and map domain names to their corresponding IP addresses.
The top-level domain (TLD) helps classify a website under a specific category on the internet.
For instance, in
mil top-level domain categorizes the army website as a military domain.
edu top-level domain classifies the Harvard website as an educational resource.
A port is a technical gate on a website's server from which browsers can access a site's resources.
So, for instance, in
https://www.codesweetly.com:80, the port is
In other words, port 80 is the gate designated to serve CodeSweetly's resources.
Keep in mind that you can omit the port number from a URL if the website's server uses a standard HTTP port to grant access to the site's resources.
For instance, suppose a site's server uses port 80 for HTTP (or port 443 for HTTPS). In that case, you do not need to specify a port number when typing the URL.
However, if the site's server uses any non-standard port to provide its resource, in that case, you must specify the port number.
A URL's file path is the path (route) to a website's resource on a web server.
A parameter (query string) allows you to send specific data to the server. When the webserver receives the query string, it can use the string's value to do other things before sending the requested resource to your browser.
An anchor is a link to a specific part of the same file the URL references.
An anchor is like a bookmark used to tell browsers to display a file's content located at the bookmarked spot.
- The part after an anchor's hash symbol (#) is sometimes called the fragment identifier.
- The fragment identifier never gets sent to the server.
Wrapping It Up
Suppose a website is a book. In that case, you can describe its URL's anatomy like so:
Anchor = A bookmark at a specific part of the book. For instance, a bookmark of a page's heading.
Parameter = Information for the book's custodian. For instance, you can use a parameter to communicate the book's language to the custodian.
File path = The specific page you need from the book—for instance, Page 625.
Port = The door number of the store where one can access the book—for instance, door 70.
Top-level domain = The genre in which the book is classified—for instance, Educational.
Domain name = The name of the book—for instance, Bible.
Subdomain = The specific section of the book you wish to access—for instance, Old Testament.
Scheme = The set of rules your agent must use to get the book from its custodian—for instance, Love.
URL = The complete web address of the content you need from the book—for instance,
This article discussed what a web address (URL) is. We also talked about the eight parts that make up a web address.