A URL is the web address you type into your browser to reach a website

A URL (Uniform Resource Locator) is the complete address of a webpage or file on the internet. When you type something like www.google.com or www.amazon.com/shoes/blue-sneakers into your browser's address bar, you are typing a URL. It tells your browser exactly where to go and what to show you.

Every URL follows the same basic structure, even though they look different. Understanding what each part means helps you spot fake websites, bookmark the right pages, and know what information you are sharing when you visit a site.

Key Takeaways

  • A URL has four main parts: the protocol (https://), the domain name (google.com), the path (/search), and sometimes a query (?q=blue+shoes).
  • The https at the start means your connection is encrypted and safer; http without the "s" means it is not encrypted.
  • The domain name is the human-readable part you remember, like amazon.com or wikipedia.org.
  • Everything after the first single slash (/) is the path, which points to a specific page or file on that website.

The four parts of a URL explained

Every URL breaks down into up to four pieces. Not every URL has all four, but understanding each one helps you read any address you encounter.

The protocol is the first part, before the colon and slashes. You will see either https:// or http://. The "s" in https stands for "secure" — it means the data you send to that website (like passwords or credit card numbers) is encrypted so others cannot read it. http:// without the "s" means no encryption. Most websites use https now, and your browser will warn you if a site uses http and asks for sensitive information.

The domain name comes next. This is the part you usually remember and type: google.com, facebook.com, nytimes.com. The part before the dot (google, facebook, nytimes) is the domain itself. The part after the dot (.com, .org, .gov) is the top-level domain, or TLD. The TLD can tell you something about the site: .com is commercial, .org is nonprofit, .gov is government, .edu is education. Some countries have their own TLDs, like .uk for United Kingdom or .ca for Canada.

The path comes after the domain name and starts with a forward slash (/). It points to a specific page or file on that website. In the URL www.amazon.com/shoes/blue-sneakers, the path is /shoes/blue-sneakers. It tells Amazon's server to show you the blue sneakers page inside the shoes section. Without a path, the URL takes you to the website's home page.

The query string is optional and starts with a question mark (?). It sends instructions to the website. In www.google.com/search?q=blue+shoes, the query string is ?q=blue+shoes, which tells Google to search for "blue shoes." You will often see query strings on shopping sites, search engines, and pages with filters.

How to spot a fake or unsafe URL

Scammers create fake URLs that look almost like real ones to trick you into visiting their site instead. Learning to read a URL carefully protects you.

The domain name is the most important part to check. In the URL https://www.paypa1.com (with the number 1 instead of the letter l), the domain is paypa1.com — not paypal.com. That single character difference means it is a completely different website, probably a fake. Always look at the domain name between the :// and the first /. That is the real address.

Be suspicious of URLs that have extra words before the real domain. For example, https://www.amazon.com.fake-site.com looks like it might be Amazon, but the actual domain is fake-site.com. Everything before it is just part of the path. If you are unsure, type the domain name directly into your browser yourself instead of clicking a link in an email or text message.

Check that the protocol is https://, especially before entering passwords or payment information. If a website asks for sensitive data but uses http://, do not enter anything. Your browser usually shows a small lock icon next to the URL when the connection is secure.

The difference between www and non-www URLs

You may notice some URLs start with www and others do not. Both https://www.google.com and https://google.com usually take you to the same place.

The www originally stood for "World Wide Web" and was a subdomain — a section of the main domain. Today, most websites automatically redirect you whether you type www or not, so it does not matter which one you use. Some websites have dropped www entirely from their addresses. There is no security or safety difference between the two.

What happens when you type a URL into your browser

When you type or click a URL, your browser does several things behind the scenes. First, it reads the protocol to know how to connect. Then it looks up the domain name using something called DNS (Domain Name System), which translates the human-readable name like google.com into a numerical address that computers use. Your browser then connects to that address, sends the path and query information, and the website's server sends back the page you requested.

This all happens in a fraction of a second. If the domain name does not exist or the path points to a page that has been deleted, you will see an error message like "404 Not Found" or "This site cannot be reached."

Why URLs matter for privacy and security

The URL bar is one of the first places to check when you land on a website. It tells you exactly where you are and whether the connection is safe. Criminals rely on people not paying attention to URLs — they send emails with links that look legitimate but actually point to fake sites designed to steal passwords or credit card numbers.

Before you enter any personal information on a website, take two seconds to read the URL. Make sure the domain name is exactly what you expect, that it starts with https://, and that you see the lock icon. These small checks stop most phishing attacks and scams.

Frequently Asked Questions

What does the lock icon next to the URL mean?

The lock icon means your connection to that website is encrypted with HTTPS. Your data is scrambled so others on the same network cannot read it. A broken lock or warning means the site uses HTTP or has a certificate problem — do not enter passwords or payment information.

Can I change the URL to get to a different page on the same website?

Yes. If you are on www.amazon.com/shoes and want to see books instead, you can change the URL to www.amazon.com/books. Not every website is organized this way, but many are. You can also delete everything after the domain name to go to the home page.

Why do some URLs have numbers and symbols in them?

Numbers and symbols in the path or query string are usually codes that tell the website what to show you. A plus sign (+) or %20 represents a space in a search. Long strings of numbers might be product IDs or session codes. You do not need to understand them — just make sure the domain name is correct.

Is it safe to click links in emails?

Links in emails can be safe, but scammers often hide fake URLs behind text that looks legitimate. Hover your mouse over the link (do not click) to see the actual URL it points to. If the URL does not match what the link text says, do not click it. When in doubt, type the website address directly into your browser instead.

What is the difference between a URL and a website?

A URL is the address — the specific location you type in. A website is the collection of all the pages and files at that address. One website can have thousands of different URLs, each pointing to a different page.