|
Hint: It helps you find things on the web[br][br][img src="/storage/emulated/0/Download/surf-internet-url-henrik5000-e-getty-images-56fa7f855f9b5829867282a9.webp"][br][br]Abbreviated as URL, a Uniform Resource Locator is a way of identifying the location of a file on the internet. They're what we use to open not only websites, but also to download images, videos, software programs, and other types of files that are hosted on a server.[br][br][br]Opening a local file on your computer is as simple as double-clicking it, but to open files on remote computers, like web servers, we must use URLs so that our web browser knows where to look. For example, opening the HTML file that represents the web page explained below, is done by entering it into the navigation bar at the top of the browser you're using.[br][br]Uniform Resource Locators are most commonly abbreviated as URLs but they're also called website addresses when they refer to URLs that use the HTTP or HTTPS protocol.[br][br]URL is usually pronounced with each letter spoken individually (i.e. u - r - l, not earl). It used to be an abbreviation for Universal Resource Locator before being changed to Uniform Resource Locator.[br][br]Examples of URLs[br]You're probably used to entering in URL, like this one for accessing Google's website:[br][br]https://www.google.com[br]The entire address is called the URL. Another example is this website (first) and Microsoft's (second):[br][br]https://lifewire.com[br]https://www.microsoft.com[br]You can even get super specific and open the direct URL to an image, like this long one that points to Google's logo on Wikipedia's website. If you open that link you can see that it starts with https:// and has a regular looking URL like the examples above, but then has lots of other text and slashes in order to point you to the exact folder and file where the image resides on the website's server.[br][br][br]The same concept applies when you're accessing a router's login page; the router's IP address is used as the URL in order to open the configuration page.[br][br]Most of us are familiar with these types of URLs that we use in a web browser like Firefox or Chrome, but those aren't the only instances where you'll need a URL.[br][br]In all of these examples, you're using the HTTP protocol to open the website, which is likely the only one most people encounter, but there are other protocols you could use too, like FTP, TELNET, MAILTO, and RDP. A URL can even point to local files you have on a hard drive. Each protocol may have a unique set of syntax rules in order to reach the destination.[br][br]Structure of a URL[br]A URL can be broken down into different sections, each piece serving a specific purpose when accessing a remote file.[br][br]HTTP and FTP URLs are structured the same, as protocol://hostname/fileinfo. For example, accessing an FTP file with its URL might look something like this:[br][br]FTP://servername/folder/otherfolder/programdetails.docx[br]Which, aside from having FTP instead of HTTP, looks like any other URL you might encounter out there on the web.[br][br]Let's use the following URL, which is Google's announcement of a CPU flaw, as an example of an HTTP address and identify each part:[br][br]https://security.googleblog.com/2018/01/todays-cpu-vulnerability-what-you-need.html[br]https is the protocol (like FTP is a protocol) that defines the type of server that you're communicating with.[br]security is the hostname used to access this specific website.[br]googleblog is the domain name.[br]com is what's referred to as the top-level domain (TLD), some others of which include .net, .org, .co.uk, etc.[br]/2018/01/ represents the directories used to organize the webpage or file. On the web server that's holding the website files, these would be the actual folders that you'd click through to find the file that this URL is specifying.[br][br]todays-cpu-vulnerability-what-you-need.html is the actual file that the URL is pointing to. If you were trying to load an image, audio file, or another file type instead of an HTML file, then the URL would end in that file extension (like a PNG or MP3).[br]security.googleblog.com as a group is called the Fully Qualified Domain Name (FQDN).[br]URL Syntax Rules[br]Only numbers, letters, and the following characters are allowed in a URL: ()!$-'_*+.[br][br]Other characters must be encoded (translated to programming code) in order to be accepted in a URL.[br][br]Some URLs have parameters that split the URL away from additional variables. For example, when you do a Google search for lifewire:[br][br]https://www.google.com/search?q=lifewire[br]The question mark you see is telling a certain script, hosted on Google's server, that you want to send a specific command to it in order to get custom results.[br][br]The specific script that Google uses to execute searches knows that whatever follows the ?q= part of the URL should be identified as the search term, so whatever is typed at that point in the URL is used to search on Google's search engine.[br][br]You can see similar behavior in the URL in this YouTube search for best cat videos:[br][br]https://www.youtube.com/results?search_query=best+cat+videos[br][br]Although spaces are not allowed in a URL, some websites use a + sign, which you can see in both the Google and YouTube examples. Others use the encoded equivalent of a space, which is %20.[br][br]URLs that use multiple variables use one or more ampersands after the question mark. You can see the example here for an Amazon.com search for Windows 10:[br][br]https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=windows+10[br]The first variable, url, is preceded by the question mark but the next variable, field-keywords, is preceded by an ampersand. Additional variables would also be preceded by an ampersand.[br][br]Parts of a URL are case sensitive — specifically, everything after the domain name (the directories and file name). You can see this for yourself if you capitalize the word "tools" in the example URL from my site that we deconstructed above, making the end of the URL read /free-driver-updater-Tools.htm. Try to open that page here and you can see that it doesn't load because that specific file doesn't exist on the server.[br][br]More Information on URLs[br]If a URL points you to a file that your web browser can display, like a JPG image, then you don't have to actually download the file to your computer in order to see it. However, for files that aren't normally displayed in the browser, like PDF and DOCX files, and especially EXE files (and many other file types), you'll be prompted to download the file to your computer in order to use it.[br][br]URLs provide an easy way for us to access a server's IP address without needing to know what the actual address is. They're like easy-to-remember names for our favorite websites. This translation from a URL to an IP address is what DNS servers are used for.[br][br][br]Some URLs are really long and complex and are best used if you click it as a link or copy/paste it into the browser's address bar. A mistake in a URL could generate a 400-series HTTP status code error, the most common type being a 404 error.[br][br]One example can be seen at 1and1.com. If you try to access a page that doesn't exist on their server (like this one), you'll get a 404 error. These types of errors are so common that you'll often find custom, often humorous, versions of them on some websites.[br][br]If you're having trouble accessing a website or online file that you think should be loading normally, see How to Troubleshoot an Error in a URL for some helpful ideas on what to do next.[br][br]Most URLs don't require the port name to be given. Opening google.com, for example, can be done by specifying it's port number at the end like http://www.google.com:80 but it isn't necessary. If the website were operating on port 8080 instead, you could replace the port and access the page that way.[br][br]By default, FTP sites use port 21, but others may be set up on port 22 or something different. If the FTP site isn't using port 21, you have to specify which one it's using in order to access the server correctly. The same concept applies to any URL that uses a different port than what the program used to access assumes by default that it's using |
|