URL (Uniform Resource Locator)

Why Trust Techopedia

What is URL (Uniform Resource Locator)?

A uniform resource locator (URL) indicates the location of a website or other online resource. It acts as a sort of Internet street address and gives you important information, including the application-layer protocol that will be used when information is transferred between a host device and your machine.

Advertisements

A URL contains the protocol used to access a resource, the location of the server hosting it, and the location of the resource in the server’s directory structure. It may also contain the server’s designated port number, or an additional element fragment identifier. You just need to know where to look.

You use a URL by typing or pasting it into your web browser’s address bar. URLs can also be linked within a web page, document, or email. When you click them, they redirect you to a site or file. The information hosted there is then delivered to your web browser window.

What is URL (Uniform Resource Locator)?

Key Takeaways

  • A URL (Uniform Resource Locator) is the unique Internet address of a website or other online resource.
  • URLs can represent HTML pages, CSS documents, PDFs, images, media files, or other digital resources hosted on an Internet server.
  • They follow a common structure that allows them to be understood by any internet device or application.
  • They also provide a human-readable entry point for websites that can be committed to memory and easily typed into a browser’s address bar.
  • Following correct URL syntax can make the difference between success and failure in SEO.

Where is the URL Located?

You can find the URL of any web page you’ve visited by looking at the address bar on your browser window, though different browsers will represent the URL in different ways.

Chrome, for example, simplifies the URL display by default to make the page location easier to read and remember. By moving your cursor to the end of the URL and clicking, Chrome will display the full URL, including the protocol.

Internet files such as images also have URLs of their own. To see an image URL in Chrome, right-click on the image in the browser window and select ‘copy image address.’

URL Structure

URLs have a standard anatomy and are always structured the same way:

  • Protocol name (either HTTP or HTTPS).
  • Colon and two slashes (://).
  • Location of the server, which is called the domain (ex: domain/xxxx).
  • The directory path, which is the location of the resource on the server (ex: domain/path).
  • The port (optional).
  • The fragment identifier (optional).

Generically, the format creates a character string that looks like this:

Protocol://location:port/file-on-server.htm?querystring=1

The most common protocols are HTTP and HTTPS, which are also referred to as schemes. The server’s location is generally a domain name like Google.com.

An example of a URL address for a website home page would be https://www.techopedia.com/

Types of URL

There are two types of URLs, absolute and relative.

Absolute URLs

List the full address of a resource following the format shown above.

For browsing the web, absolute URLs are typed in the browser address bar. For example, a feature article on the Techopedia website would have the URL https://www.techopedia.com/article-name, which provides full information about the file location path.

Relative URLs

Only point to a location within an absolute URL you’ve already accessed, so they don’t include information like the protocol or domain.

A relative URL contains the path of a resource but excludes the domain name. For example, a Techopedia web developer setting up a new webpage might want to link an image called “latestgadgets”.jpg”.

To do that, they would create a relative URL, written as <img src=”./latestgadgets.jpg”>, which would tell the web server to look for the image within the current directory.

URL Syntax

URLs follow a standard structure, and also use a standard language or syntax. These are the rules and conventions that dictate how a URL should be written. When you’re building a website, sticking to accepted syntax enables web browsers and servers to understand exactly what resource a user is looking for and deliver the correct results.

In addition to the mandatory structural elements of a URL detailed above, URLs can also include things like anchor links or fragments, which send you directly to specific content on a page. Fragments are indicated by a hash symbol (#) followed by the name of the anchor.

Knowing correct URL syntax helps you to create easily searchable URLs, something vital for search engine optimization (SEO).

URL Importance for SEO

SEO strategies depend on well-structured URLs to help users easily find a website or hypertext markup language (HTML) page. If your organization relies on SEO to drive web traffic, your website URLs need to be SEO-friendly. In practice, that means creating URLs that search engines can easily locate and index.

SEO best practices for URLs include using a proper URL structure, using the HTTPS protocol (because it indicates a higher level of security), and hosting the site so that the protocol and www prefix can be hidden for easier reading. It’s also a good idea to use commonly searched keywords that match the age content within the URL.

Why URLs Can Be Confusing

To make it easier for web users, companies have started displaying URLs in a simpler format that excludes generic info like ‘http/https’ and ‘www,’ while some web browsers have started using this pared-down format by default.

The use of URL fragments to deliver users to a specific passage on a web page – usually after typing a question into a search engine – can also create lengthy and hard-to-read URLs.

5 Tips for Creating User-Friendly URLs

 

  1. Make them as short as possible.

  2. Focus on making them readable.

  3. Use hyphens as separators, not underscores.

  4. Establish a consistent URL naming convention that gives the pages on your site a logical structure.

The Bottom Line

URLs are the Internet’s equivalent of listings in a phone directory. By definition, they’re unique locators that browsers and search engines can use to dial up web resources, even pinpointing specific images or even passages of text on a page. Getting them right and using established syntax makes it easy for users to find what they are looking for online.

FAQs

What is a URL in simple terms?

How do I know what my URL is?

What does my URL mean?

What’s the difference between a URL vs. URI?

How to create a URL?

What is a simple URL?

What are URL shorteners?

What are the 4 components of a URL?

Why is the URL important?

Advertisements

Related Terms

Mark De Wolf
Technology Journalist
Mark De Wolf
Technology Journalist

Mark is a freelance tech journalist covering software, cybersecurity, and SaaS. His work has appeared in Dow Jones, The Telegraph, SC Magazine, Strategy, InfoWorld, Redshift, and The Startup. He graduated from the Ryerson University School of Journalism with honors where he studied under senior reporters from The New York Times, BBC, and Toronto Star, and paid his way through uni as a jobbing advertising copywriter. In addition, Mark has been an external communications advisor for tech startups and scale-ups, supporting them from launch to successful exit. Success stories include SignRequest (acquired by Box), Zeigo (acquired by Schneider Electric), Prevero (acquired…