A link is more formally known as a URL, which stands for Uniform Resource Locator. In the domain of computer science, there’s always been a debate about the difference between a URL and a URI. Sometimes you’ll see the word web link and URL used interchangeably, and sometimes you’ll see the acronym URL and URI used interchangeably. URI stands for Uniform Resource Identifier. It is slightly more general and can refer to things that are not actually files, although URLs are not solely used to identify files anymore. URI is more general than URL, and URL is more formal and precise than a weblink.
URL is used to be able to identify the same thing using a name, using a path, and using using a locator that works regardless of where you start from.
The syntax for a URL is as follows:
- Scheme defines the type of internet service. This could be http, ftp or https.
- FTP allows you to upload files to the server remotely.
- HTTP is the port protocol for accessing the website.
- Prefix is the domain prefix. For example: www.
- Domain is the actual name that you purchase which defines the internet domain name,g. google.com.
- Port specifies the port number at the host. For http, the default port is 80.
- Path defines a path to the server, which is usually a folder containing some resources which you want people to access. A sample path could be as follows: domain name/path/filename
- Filename defines the name of a document or resource.
When you type the domain name into your browser, it automatically adds the scheme. You can add the path and filename if you want to access a specific resource in the website.
Before computers were connected, each file had a path name that you’d use to access a file in your computer. The format for describing a file path was different for each operating system. When computers were connected, a standard method of finding files across the network was needed. URLs, as a result, make the internet look like it’s one big file system, or one enormous hard drive, so that we can access files anywhere on the internet by using the same path identifier. When computers weren’t yet connected, it was hard to locate a file, as you needed to know from which computer any given file was saved. As computers became connected, it became easier to find files from computers. Given that URLs are standardised, it became even easier, and that’s where we are today.
The resource that you specify may not actually be a file that exists; it might have been constructed on the fly. The path might be part of the query, or it could be part of the parameters. There is probably a whole fleet of computers that are delivering your request, each of which are hiding behind a single host name.
You can directly type a URL in the address bar of your web browser. For example, you might enter a website URL you saw in a business card in order to visit the company’s website. Most URLs, however, automatically display when you click on a link or open a bookmark. If the server name is invalid, your browser may display an error message “Server not found”. If the path is incorrect, the server may display a 404-error message.
URLs use forward slashes to signify different directories. URLs cannot have spaces, which is why dashes and underscores are often used to disconnect words within a web address. If your browser displays an error when you visit a webpage, review the URL for typos or other errors. If you find an error, you can directly edit the URL and press Enter to see whether or not it then displays correctly.