Know about URL parts

Ridwanul Alam
2 min readMay 1, 2021

Uniform Resource Locator shortly is URL called the global address of documents and World Wide Web.

For instance, if you look at the example which is given below, you will see:

https://thizizrid.medium.com/know-about-url-parts-3214a381564

— This is the URL of the web page you are viewing right now.

The URL Syntax

The general syntax of URLs is the following:

Scheme name —

The very first part of the URL is a scheme. Also known as “protocol” identifies the protocol to be used to access the resource over the internet.

The most commonly used protocols are HTTP://, HTTPS://, ftp://, and mailto://.

Hostname —

A hostname is nothing but an IP address, it helps to recognize and memorize names to numerically addressed Internet resources. For example, www.abcdxyz.com consists of the host’s machine name www and the domain name abcdxyz.com.

Various Part of URL

Port Number —

Servers often deliver more than one type of service, so you must also tell the server what service is being requested. These requests are made by port number. Well-known port numbers for service are normally omitted from the URL.

For example, web service HTTP runs by default over port 80, HTTPS runs by default over port 443.

Path —

The path identifies the specific resource within the host that the user wants to access. The path is the most important URL part, optimizing the subdirectory and file name helps in better ranking on search engines.

For example, /html/html-url.php, /news/technology/, etc.

Query String —

The query string contains data to be passed to server-side scripts, A question mark (?) in the URL says that you are trying to put a query. Query string starts with a question mark (?) and separated with an ampersand (&)

Fragment identifier —

The fragment identifier introduced by a hash character (#) is the optional last part of a URL for a document. It represents the specified portion of the same websites.

--

--

Ridwanul Alam

A Frontend Web Developer. Devoted to solving new problems and developing interactive web application