How to parse a URL
- Paste the full address into URL. If it has no scheme, like www.example.com/page, https:// is added for you.
- Read the parts: protocol, host, port, path, query string, fragment and origin. Encoded characters in the path and fragment are decoded.
- Check the table below for each query parameter and its decoded value.
The parts of a URL
The sample address breaks down like this:
| Part | In the sample | What it does |
|---|---|---|
| Protocol | https |
How to connect. https means an encrypted connection. |
| Host | shop.example.com |
The server’s domain name or IP address. |
| Port | 8443 |
Which service on the server. Usually left out. |
| Path | /search/shoes |
The page or resource on that server. |
| Query string | ?size=42&colour=dark%20blue&utm_source=newsletter |
Name and value pairs joined with &. |
| Fragment | #reviews |
A spot on the page, such as a heading. |
The fragment never reaches the server. The browser keeps it and uses it to scroll to the right part of the page, or a web app reads it with JavaScript. The origin is the protocol, host and port together, and it’s what browsers use to decide which sites can share data.
UTM parameters
Parameters that start with utm_ are tracking tags for analytics tools such as Google Analytics. They record where a visit came from and don’t change the page itself.
- utm_source: the site or sender, like newsletter or google.
- utm_medium: the kind of traffic, like email, cpc or social.
- utm_campaign: the name of the campaign or promotion.
- utm_term: the paid search keyword.
- utm_content: which link or ad was clicked, when there are several.
You can usually delete them before sharing a link. The page loads the same, and the person you send it to isn’t counted as part of someone else’s campaign.