Skip to main content

Uniform Resource Locator (URL)

TL;DR

A uniform resource locator (URL) is a web address indicating the location of a web page or a file on the Internet. URLs are mostly used for web pages, but they can also be used for file transfer (ftp), email (mailto), database access (JDBC) and others. 

About URL

URL stands for uniform resource locator and is the same thing as a web address. The URL is a string of characters that point to the location of a resource on the world wide web and it indicates the specific protocol used to access that resource. A popular comparison for a better understanding of a URL is to a home address, as there are no two same addresses in the whole world, each one being unique and pointing to a specific house, or in the case of a URL to a specific page/file on the Internet.

How URLs are constructed

A URL usually contains the following parts: protocol or scheme (http://, ftp://, news://, // ,etc), then the domain name (hostname, dot and suffix: com, org, etc). In some cases, the domain name is followed by a slash and the name of a folder and/or a specific resource (filename and extension: .asp, .htm, or .html). Additional parameters can be added at the end of the link for better segmentation. In the end, all these elements together will make up a URL that in most cases looks like this: http://www.thedomain.com/company/team

What are URL Redirection and Canonical URLs?

URL redirection is used when a web page is moved, renamed or deleted or the URL has been shortened. The most popular method of URL redirecting is through 301 or 302 redirect in the .htaccess file. 

Often the same web page can be opened by typing in different variations of a URL:

  • www.example.com
  • example.com
  • www.example.com/index.htm

Search engines will interpret them as 3 separate pages even though they open the same page, so for SEO purposes, a canonical URL needs to be established. In the example above the main URL/canonical URL would be www.example.com