parts of a url – What is a URL (Uniform Resource Locator)?

Different Parts of a URL for The protocol, The domain name, The subdomain, Port, Path, Query, Parameters and Fragment.

parts of a url

parts of a url – URL (Uniform Resource Locator) – Explain Different Parts of The URL With Example. Let’s break down this URL structure below. A URL consists of five parts: the scheme, subdomain, top-level domain, second-level domain, and subdirectory.

The Parts of a URL OR The components of a URL

URL Structure – URL stands for Uniform Resource Locator



Domain Name OR Second-level Domain

Top-level Domain

Port Number :

Path :

Query String Separator :

Query String :

Fragment :



Components of a URL

FAQs: Parts of the URL

What are the 3 basic parts of the URL?

  • Protocol (HTTP or HTTPS)
  • The Domain Name
  • Port

What are the main components of a URL?

  • The protocol
  • The domain name
  • Port

What is called in URL?

URL stands for Uniform Resource Locator

Depends on how deep you want to go :

Example URL:

breaks down into;

  1. Scheme(https:// (also known as “protocol”))
  2. Domain (
  3. Subdomain (www)
  4. DomainName (
  5. TLD (.co (top level domain))
  6. SLD (.org (second level domain))
  7. Port (:80)
  8. Path (/blog/welcome.html)
  9. Directory Path (/blog/)
  10. File Path (welcome.html)
  11. File Name (welcome)
  12. File Extension (.html)
  13. Query (?api=2022&members=admin)
  14. Parameter and Value Pair (api=2022)
  15. Parameter and Value Pair seperator (&)
  16. Fragment (#here)

Don’t Miss : Get the full URL in PHP

I hope you get an idea about parts of a url.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment