Types of URL (original) (raw)

Last Updated : 23 Jul, 2025

**URL stands for Uniform Resource Locator. Any internet location available on the server is called a web URL, web address, or website. Each website or webpage has a unique address called URL. e.g., the website of **geeksforgeeks website has an address or URL called https://www.geeksforgeeks.org/

**Types of URL: URL gives the address of files created for webpages or other documents like an image, pdf for a doc file, etc.

**Type:

Table of Content

**Absolute URL

This type of URL contains both the domain name and directory/page path. An absolute URL gives complete location information. It begins with a protocol like "http://" and continues, including every detail. An absolute URL typically comes with the following syntax.

Syntax:

protocol://domain/path

For web browsing, absolute URLs are types in the address bar of a web browser. For example, if it is related to our project page link on **geeksforgeeks website, the URL should be mentioned as https://www.geeksforgeeks.org/gate/computer-science-projects/ this gives the complete information about the file location path.

**Note: The protocol may be of the following types.

http://, https://, ftp://, gopher://, etc.

**Relative URL

This type of URL contains the path excluding the domain name. Relative means "in relation to", and a relative URL tells a URL location on terms of the current location. Relative path is used for reference to a given link of a file that exist within the same domain.

Let us assume a web developer setting up a webpage and want to link an image called "geeksforgeeks.jpg".

It would internally be interpreted like the following.

The dot(.) before the "/" in the _src attribute is a "special character". It means the location should be started from the current directory to find the file location.