Website Tools

The Anatomy of a URL Every Part Explained

Web addresses look like random strings, but every part has a job. Understanding them helps with SEO, analytics, debugging, and spotting scam links.

Quick answer: in https://shop.example.com/shoes/red?size=9#reviews, https is the protocol, shop.example.com is the host (subdomain plus domain), /shoes/red is the path, ?size=9 is the query string and #reviews is the fragment that jumps to part of the page.

In this article
  1. A URL taken apart
  2. Parse any address
  3. Reading the domain correctly: a safety skill
  4. Query parameters in practice
  5. Subdomains vs folders
  6. Ports and local addresses
  7. Why the fragment matters
  8. Uses for site owners
  9. Encoded parts

A URL taken apart

Take https://shop.example.com:8443/products/shoes?colour=red&utm_source=newsletter#reviews:

PartValueMeaning
Protocolhttps:Secure connection (http is unencrypted)
SubdomainshopA section run under the main domain
Domainexample.comWho owns the site, the key part for trust
Port8443Usually hidden; 443 for https, 80 for http
Path/products/shoesWhich page
Query stringcolour=red&utm_source=newsletterExtra parameters for the page or tracking
Fragment#reviewsA position on the page; never sent to the server
URL ParserSplit any URL into protocol, host, port, path, query parameters and fragment. Decodes values, flags tracking parameters and copies a clean link.
Open the free tool

Parse any address

  1. Paste a URL into the URL Parser.
  2. See protocol, host, port, origin, path and fragment separately.
  3. Read every query parameter in a table, decoded into normal text.
  4. Spot tracking codes, utm_*, gclid, fbclid and similar, which are flagged automatically.

The tool uses the browser’s standard URL parser, the same one that decides where your browser actually goes.

Reading the domain correctly: a safety skill

The real domain is the part just before the first single “/” after “https://”, read from right to left. In https://paypal.com.secure-login.net/account, the domain is secure-login.net, not PayPal. Scammers put familiar names in subdomains or paths to fool people. Also watch for look-alike characters, such as “rn” pretending to be “m”, or a zero instead of “o”.

Query parameters in practice

  • Filters and searches: ?q=laptop&sort=price.
  • Campaign tracking: utm_source, utm_medium, utm_campaign, build them with the UTM Builder.
  • Ad click IDs: gclid (Google Ads), fbclid (Facebook), safe to remove when sharing a link.

Subdomains vs folders

A blog can live at blog.example.com (a subdomain) or example.com/blog/ (a folder). Both work for search engines, but a folder is usually simpler to manage and keeps everything under one site in analytics and Search Console. Subdomains suit separate applications, such as a help centre or a shop run on another platform.

Ports and local addresses

Developers often see addresses like http://localhost:3000 or 192.168.1.1. These point to your own computer or local network, not the public internet. If a link you receive points to such an address, it will not work for you, it was copied from someone’s test setup.

Why the fragment matters

Everything after “#” stays in the browser. It is used to jump to a heading, and by some web apps for navigation. Because servers never see it, analytics tools cannot track fragments unless a script reports them.

Uses for site owners

  • Check campaign links before an email goes out.
  • Debug redirects that drop or duplicate parameters.
  • Find duplicate-content issues caused by parameters, and fix them with canonical tags.

Encoded parts

Parameters often contain % codes. The parser decodes them for you; to encode or decode text yourself, use the URL Encoder and URL Decoder. For readable page addresses, see the Slug Generator.

Frequently asked questions

What are the parts of a URL?

The protocol, domain, path, query string and fragment.

What does https mean?

The connection between the browser and the site is encrypted.

What is a query string?

The part after the question mark that passes extra data, such as search terms.

What is a URL fragment?

The part after the hash sign that points to a section within a page.

Is www needed in a URL?

No. Choose one version and redirect the other to it.

Is the fragment sent to the server

No. The part after # stays in the browser and is used to jump to a section or by page scripts.

Are URLs case sensitive

The domain is not, but the path and query can be, depending on the server. Use lowercase paths to be safe.

URL ParserSplit any URL into protocol, host, port, path, query parameters and fragment. Decodes values, flags tracking parameters and copies a clean link.
Open the free tool
Keep reading

Related articles

All articles
Dev

How to Read Messy Links Full of % Codes

Links copied from emails, search results and ads are often a jumble of percent codes. Decoding them shows what they really say, and where they really go.

3 min read
Dev

URL Encoding Explained, Why Spaces Become %20

Paste a link with spaces, “&” or Urdu text and it can break. URL encoding fixes this by turning special characters into safe % codes.

3 min read
Text

What Is a URL Slug, and How to Write SEO-Friendly URLs

The slug is the readable end of a web address. A clean one helps people trust and remember your link, and helps search engines understand the page.

3 min read