Free Lesson

What Is a URL?

A URL (Uniform Resource Locator) is the address of a page or file on the web, such as https://www.example.com/about. It tells your browser how to connect, which website to ask and which page to load.

Every URL is built from the same few parts. Snap them together below and watch the page change, then test yourself on which edits take you somewhere new.

Interactive lesson

URL builder and prediction game

Build a web address

Pick each part of the URL for a pretend cookie shop. The address bar and the page preview update as you go.

https://shop.example.com/cookies

The shop site of example.com

Cookies page

Secure connectionNo filterTop of the page

Your browser connects securely to shop.example.com, asks it for the cookies page.

Scheme: How to connect
Domain: Which website
Path: Which page
Query: Filter or sort
Fragment: Which section

Challenge: assemble the address for a given page

Pick a challenge, then use the part buttons above to solve it.

Predict: which edits change the destination?

Start from https://shop.example.com/cookies?sort=price#reviews and change one part. What happens?

  1. Change the fragment #reviews to #recipe
  2. Change the query ?sort=price to ?sort=name
  3. Change the path /cookies to /cakes
  4. Change the domain shop.example.com to www.example.org
  5. Change the scheme https:// to http://

Anatomy

The parts of a URL

https://shop.example.com:443/cookies/chocolate-chip?sort=price&vegan=yes#reviews

Parts of a URL with examples
PartExampleWhat it does
Schemehttps://The protocol, or how the browser should connect. https adds encryption.
Subdomainshop.An optional section of a website, such as shop, blog or www.
Domain nameexample.comThe website's registered name. The last part (.com) is the top-level domain.
Port:443Usually hidden. Like a door number on the server; https uses 443 by default.
Path/cookies/chocolate-chipWhich page or file on that website, like folders on a computer.
Query string?sort=price&vegan=yesExtra settings as key=value pairs joined by &, used for search, filters and tracking.
Fragment#reviewsA spot on the page to jump to. It stays in the browser and is not sent to the server.

Common question

URL vs domain name vs IP address

URL vs domain name vs IP address comparison
URLDomain nameIP address
What it isThe full address of one page or fileThe website's nameThe server's number on the internet
Examplehttps://shop.example.com/cookiesexample.com203.0.113.10
Who uses itYou and your browserPeople, and DNS to find the IPComputers and routers

How to

How to read any URL in 5 steps

  1. 1. Find the scheme

    Read up to ://. https means the connection is encrypted; http means it is not.

  2. 2. Read the host right to left

    The real website is the part just before the first single slash, read from the right: in shop.example.com it is example.com.

  3. 3. Follow the path

    Each /folder after the host narrows down which page you will get.

  4. 4. Check the query

    Everything after ? is settings, like a search word or a filter. Long ones are often tracking.

  5. 5. Spot the fragment

    A # at the end only jumps to a section of the same page.

Get your own developer URL

Code Card gives you a public profile at codecard.dev/your-name with activity graphs, streaks and badges from your Claude Code, Codex and OpenClaw sessions. Start with npx code-card.

Make your Code Card

FAQ

URL questions, answered

What is a URL?

A URL is the address of a page or file on the web, such as https://www.example.com/about. It tells your browser how to connect, which website to ask and which page to load.

What does URL stand for?

URL stands for Uniform Resource Locator. It is a standard (uniform) way to locate a resource, such as a web page, image or video, on the internet.

What are the parts of a URL?

A URL has a scheme (https://), a host or domain name (www.example.com), an optional port, a path (/about), an optional query string (?q=cats) and an optional fragment (#top).

Is a URL the same as a domain name?

No. The domain name, such as example.com, is only one part of a URL. The URL is the full address, including the scheme, path and any query, so it points to one exact page.

Where do I find the URL of a page?

Look in the address bar at the top of your browser. On a phone, tap the address bar or use Share then Copy link to see and copy the full URL.