When you prepare a website for the first time, you will encounter two related but distinct concepts: domain names and URLs. Understanding what each one does helps you read, write, and organize web addresses with confidence before your project goes live.

What Questions Do Domain Names and URLs Each Answer?

Suppose you are planning a small personal project and you sketch out an address for one of its pages: https://example.org/notes/first-page?view=compact#intro. This address is entirely hypothetical and is used here only as a string to take apart. It does not point to a real page, and no server is expected to respond to it. The purpose of writing it down is to practice identifying what each segment communicates.

A domain name answers the question “which server am I talking to?” Domain names provide a human-readable address for any web server available on the Internet, because IP addresses are hard to remember and might change over time. In our example, example.org is the domain name. It identifies one particular server among all the machines connected to the network.12

A full URL answers a broader question: “which specific resource on that server do I want?” A URL is the address of a unique resource on the internet, and it is one of the key mechanisms used by browsers to retrieve published resources such as HTML pages, CSS documents, and images. The domain name is only one component inside the URL. The scheme, path, query parameters, and fragment together narrow the request down to a particular location and, in some cases, a particular spot within that location.34

Reading Each Part of the Example Address

The first part of the URL is the scheme, which indicates the protocol that the browser must use to request the resource. In our example, https is the scheme. It tells the browser to use the secure version of the HTTP protocol when contacting the server. The characters :// that follow the scheme separate it from the next part of the address.3

After the scheme comes the authority, and in our example the domain example.org serves that role. The domain indicates which web server is being requested. A domain name has a simple structure made of several parts separated by dots and read from right to left. The rightmost part, org, is the top-level domain, which tells users the general purpose of the service behind the domain name. The label to its left, example, is the second-level domain that distinguishes this particular registration from others under the same TLD.314

The path /notes/first-page follows the domain. It represents the location of the resource on the web server. In the early days of the web, a path like this represented a physical file location, but nowadays it is mostly an abstraction handled by web servers without any physical reality. After the path, the question mark introduces the query string. In our example, view=compact is a key-value pair that provides extra parameters to the web server. The server can use those parameters to do extra processing before returning the resource. Finally, the hash character # introduces the fragment identifier. Here, intro is an anchor to another part of the resource itself, representing a sort of bookmark inside the document. The part after the hash is never sent to the server with the request.3

Comparing Different Paths and Queries on the Same Host

Now keep the host part of the example unchanged and vary only the path. If you change /notes/first-page to /notes/second-page, the domain and scheme remain identical, but the string after the domain points to a different resource location on the same server. The path is the part of the URL that distinguishes one page or file from another within the same domain. You are not making any claim about what the server actually does with these paths; you are simply observing that the strings differ in their path segment.3

Next, change only the query string. Replace view=compact with view=full. The scheme, domain, and path stay the same. Only the characters after the question mark differ. This observation shows that the query is a separate component from the path. The web server can use those parameters to do extra stuff before returning the resource, and each web server has its own rules regarding parameters. From the string alone you cannot determine what the server will actually do differently; you can only note that the request carries different information.3

You can also remove the fragment entirely. The address https://example.org/notes/first-page?view=compact is still a complete, valid URL without the #intro portion. The fragment is optional and only affects how the browser displays the resource once it has been retrieved. Comparing these variations side by side helps you see that each segment of the URL serves an independent role, and changing one does not necessarily change the others.3

Making an Address Description Card for Your Project

Record the purpose of each address you plan to use before your site launches. For the hypothetical example, you might write: “This is the main notes page, displayed in a compact layout, with the browser scrolling to the introduction section.” Writing the purpose in plain language forces you to think about what the address is supposed to accomplish, not just what characters it contains.

Write the full address on its own line, then list each component beneath it: scheme, domain, path, query, and fragment. For our example, the card would show https as the scheme, example.org as the domain, /notes/first-page as the path, view=compact as the query, and intro as the fragment. This layout makes it easy to spot a missing question mark or a misplaced slash when you later copy the address into a link or a configuration file.

If your project has multiple pages, create one card per address. Even if the domain and scheme are identical across all of them, writing each card separately prevents you from accidentally reusing a path or query from the wrong page. The cards also serve as a quick reference when you explain your site structure to a collaborator or check that your links are consistent.

Verifying Your Card by Copying and Marking

Once your description card is written, verify it against the actual string. The following steps are author suggestions for a manual check that requires no special tools.

This method catches common mistakes such as a missing slash between path segments, a question mark placed where a hash should be, or a query parameter written without its value. Because you are comparing your own notes against the raw string, the check is only as good as your attention to each character.

Check the fragment last. Since the fragment is never sent to the server, a typo there will not break the request itself, but it may cause the browser to fail to scroll to the intended section. Confirming it on your card ensures the anchor name matches what you defined in your content.

Step 1

Copy the full URL from your card into a plain text editor or a blank document so you can see every character without formatting.

Step 2

Mark each delimiter by hand: draw a line before :// to separate the scheme, a line before the first / after the domain to separate the authority from the path, a line before ? to separate the path from the query, and a line before # to separate the query from the fragment.

Step 3

Compare each marked segment against the corresponding entry on your description card. If any segment does not match, correct the card or the address and repeat the marking.

Keeping Your Description for Future Writing and Communication

Store the completed cards in a place you will revisit as your project grows. A simple text file, a note in your project management tool, or even a printed sheet beside your desk all work. The goal is to have a single reference that lists every address you plan to use, so you do not need to reconstruct the structure from memory each time you write a link or explain your site to someone else.

When you add new pages, extend the existing set of cards rather than starting over. Because the domain and scheme usually stay the same across a single site, you only need to record the new path, query, and fragment for each addition. This keeps your reference compact and highlights the parts that actually change from page to page.

Your choice of how detailed to make each card is up to you. Some people record only the full address and a one-line purpose; others break down every segment. Either approach is valid as long as the card is clear enough for you to verify the address later without guessing. The exercise of writing and checking these cards builds the habit of reading URLs carefully, which pays off whenever you debug a broken link or configure a redirect.

Frequently asked questions

Is the domain name the same thing as the URL?

No. A domain name identifies a server, while a URL is a complete address that includes the scheme, domain, path, and optionally a query and fragment. The domain is one component inside the URL.13

Does the fragment part after the hash get sent to the server?

No. The fragment identifier is never sent to the server with the request. It is used only by the browser to navigate to a specific spot within the already-retrieved resource.3

Can I change the query string without changing the page content?

From the URL string alone you cannot determine what the server will do. The query provides extra parameters, and each web server has its own rules for handling them. Changing the query may or may not change the returned content depending on the server's logic.3