URL, aka Uniform Resource Locator, is an address to where a specific resource lives on the web. It works in the same way that your home address dictates where you live in your neighborhood.
The basic anatomy of a URL consists of 8 main parts:
- Scheme – refers to the protocol. It is the set of rules the browser must use to access and exchange data on the web. The 2 most common protocols for websites are HTTP and HTTPS, but there are many others.
- Subdomain, Domain, and Top-level Domain – These 3 parts make up what is generally known as the domain name. Computers need to constantly communicate with each other to perform various actions. All devices connected to the internet have a unique identifier that consists of a series of numbers and letters called an IP Address. Since IP addresses can be long and hard to remember, domain names were made so that websites could be easier to type and access.
- Port – indicates what door a browser should use when it arrives at a resource’s location (MDN)
- Path – provides a more specific location to a specific resource
- Query String – allows users to communicate and send small amounts of data to the server side
- Fragment Identifier- is a an anchor. It identifies a specific location on a HTML page.
An IP address, aka Internet Protocol address, is a label given to every device connected to a network that uses the internet protocol (MDN). It can consist of numbers and/or letters. The 2 main formats for IP addresses are IPv4 (32-bit) and IPv6 (128-bit).