This article is free to read. Creating a lesson uses your daily or stored credits; review the language and settings before starting.
How does a URL work?
Quick answer
A URL is the address of a resource on the internet. It begins with a protocol like https, followed by a domain name that DNS converts to a server's IP address, then a path to the specific file, and optional query data. The browser uses these parts to request and display the correct content.
A URL is a text address that identifies a resource on the internet and tells your browser how to fetch it. It combines a protocol, a domain name, and a path so computers can locate and request the right file or page.
Step by step
- You type or click a URL, and the browser splits it into scheme, domain, path, and query.
- The browser uses DNS to translate the domain name into the IP address of a server.
- It opens a connection to that server and sends an HTTP request for the path and query.
- The server processes the request and returns the requested resource, such as an HTML page.
- The browser renders the response, displaying the page or file you asked for.
Key things to understand
- A URL starts with a scheme like https, which tells the browser which protocol to use for the request.
- The domain name, such as example.com, is translated by DNS into a numeric IP address of a server.
- The path, like /articles/url, points to a specific resource or page on that server.
- A query string after a question mark sends extra data, such as search terms or page numbers.
- The browser sends an HTTP request to the server, which returns the resource for display.
Labelled diagram
- Scheme
https tells the browser to use secure HTTP for the request.
- Domain
example.com is looked up by DNS to find the server's IP address.
- Path
/articles/url points to a specific file or page on that server.
- Query
?q=hello sends extra data, like a search term, to the server.
Real-world examples
- Typing https://www.wikipedia.org/wiki/URL into a browser loads the Wikipedia article on URLs.
- A search result link like https://www.google.com/search?q=weather sends your query to Google's server.
- Scanning a QR code on a poster opens a URL such as https://example.com/event that loads an event page.
- Clicking an email link like https://mail.example.com/inbox/123 opens a specific message in your webmail.
Common mistake
✗ Myth: A URL is the same as a domain name.
✓ Fact: A domain name is only one component of a URL. A URL also includes the protocol, path, and possibly a query string, which together specify exactly how and what to fetch.
People also ask
What happens when you type a URL?
How does dns work with urls?
What is a query string in a url?
What is the difference between a URL and a domain name?
What does HTTPS mean in a URL?
Can a URL work without www?
What happens if I type a URL with a typo?
Part of the guide: How the Internet Works →

