Browser & Tracking

URL

About 5 min read

What Is a URL

A URL (Uniform Resource Locator) is a string that indicates the location of a resource on the internet. Just as a street address points to a building, a URL points to content on the web.

The string displayed in your browser's address bar, such as https://www.example.com/page, is a URL. Every time you click a link, your browser uses this URL to access the server.

URL Structure

A URL consists of several parts.

Scheme
The https:// part. Specifies the communication method. https means encrypted, http means unencrypted.
Domain Name
The www.example.com part. The name of the website. Translated to an IP address by DNS.
Path
The /page part. Specifies which page on the server to display.

URLs may also include query parameters (?q=search) for passing search conditions and fragments (#section1) for pointing to specific positions within a page.

How to Read URLs Safely

One clue for spotting phishing is reading the domain name correctly. The key is to check the part between :// and the next /.

  • Legitimate: https://www.amazon.co.jp/dp/... - domain is amazon.co.jp
  • Fake: https://amazon.co.jp.evil.com/... - domain is evil.com

Read the host from right to left. The part someone actually registered is the top-level domain (.com, .jp) plus one label to its left; when the suffix has two parts, such as co.jp or co.uk, include one more label (amazon in amazon.co.jp). Where the suffix ends depends on each registry's policy, and these boundaries are collected in the Public Suffix List (started by Mozilla and originally created to meet the needs of browser makers). Everything further left is a subdomain that the owner can add at will.

Also, when an @ appears between :// and the next /, the host is whatever follows that @; the left side is a field for a user name and other credentials (the userinfo of RFC 3986, which deprecates the user:password form). RFC 3986 warns that this field can be used to mislead users, so if you see an @ in that position, read the right-hand side. An @ later in the URL, inside the path, is just an ordinary character (as in social-media profile URLs) and this rule does not apply.

Shortened URL Risks

Shortened URLs like bit.ly/xxxxx or t.co/xxxxx hide the original URL, so the link itself gives no clue for judging in advance whether the redirect destination is safe.

How to safely check shortened URLs:

  • A URL expander service shows the destination before you click
  • Whether the sender is trusted is another factor in deciding whether to open the link

URLs and Privacy

URLs can contain privacy-related information. Tracking parameters (?utm_source=...) are described in Google Analytics Help as parameters for measuring campaign information such as the referrer. When copying and sharing URLs, removing unnecessary parameters keeps that referrer information from being passed along.

For more details on this topic, see also How to Read URLs Safely.

Common Misconceptions

HTTPS means the site is safe
HTTPS only indicates that the communication is encrypted. It does not guarantee the trustworthiness of the site. Scam sites can also obtain free SSL certificates.
Longer URLs are more suspicious
URL length is not an indicator of safety. Legitimate sites can have long URLs for product pages. The clue to check is the domain name.

URL vs URI

URL

Indicates the location of a resource. Used as a web address in everyday life.

URI

A broader concept indicating a resource identifier. URL is a type of URI (RFC 3986). The general term is URI in RFC 3986 and URL in the WHATWG URL Standard.

Share

Related Terms

Related Articles