Home / WordPress Guides / WordPress Basics / How URLs Work: A Beginner’s Guide to Web Addresses

How URLs Work: A Beginner’s Guide to Web Addresses

TABLE OF CONTENTS

Free WordPress Site Review

Is your WordPress setup ready for what 2026 demands?

TL;DR

  • A URL is the web address that tells a browser where to find a page, image or file online. It has a protocol, a domain name and a path, plus optional parameters and a fragment.
  • A domain name is the second-level domain plus the TLD (like kiwistic + .com). Subdomains such as www or blog sit in front of it.
  • Short, lowercase URLs with hyphens and one clear keyword are easier for people and search engines to read.
  • Changing a live URL without a 301 redirect breaks links and loses traffic. In WordPress, set your permalinks to “Post name” before you publish.
How URLs work is something most site owners learn only after something breaks. A page gets renamed, a redesign changes the structure, and suddenly every link you’ve earned points to a 404.
When we migrate or redesign small business sites, a changed URL with no redirect is one of the most common reasons traffic drops afterward. It’s also one of the easiest to prevent.
This guide explains each part of a URL in plain English. You’ll see what every piece does, what makes a URL easy for search engines to read, and how to set up WordPress so you don’t have to fix addresses later.

What Is a URL?

A URL (Uniform Resource Locator) is the web address that tells a browser where a page, image or file lives and how to reach it. Every URL has at least a protocol and a domain name, such as https://kiwistic.com. Most add a path that points to one specific page, like /wordpress-maintenance/.

Think of it like a street address. The protocol is how the mail gets delivered, the domain name is the building, and the path is the exact apartment. Leave out the protocol or domain name and the browser can’t connect. Leave out the path and it simply loads the site’s homepage. The next section breaks down each part.

Parts of a URL: What Each Piece Does

Let’s break one address into its parts. We’ll use this example:

https://www.example.com/guides/how-urls-work?ref=newsletter#parts

Browser address bar diagram showing protocol, subdomain, second-level domain, top-level domain, and path

1. Protocol: https://

The protocol tells the browser how to talk to the server. You’ll see two:
  • HTTP sends data as plain text.
  • HTTPS encrypts the connection, so passwords and payment details can’t be read in transit.

Browsers like Chrome label HTTP pages as “Not secure,” and Google has used HTTPS as a ranking signal since 2014. Today it’s the baseline for any site.

In WordPress, check Settings > General. Both the WordPress Address and Site Address should start with https://.

2. Domain Name: example.com

The domain name is the part people remember. It has two pieces:
  • Second-level domain (SLD): the name you register, like example or kiwistic.
  • Top-level domain (TLD): the ending, like .com, .org, or a country code like .ca or .co.uk.
Everything in front of the domain name is a subdomain. www is the most common one, and sites also use others such as blog.example.com or shop.example.com to separate sections or tools. A subdomain is not part of the domain name itself.

3. Path: /guides/how-urls-work

The path points to one specific page or file on the site. It reads like folders on your computer: /guides/ is the folder, how-urls-work is the page.
In WordPress, the last part of the path is the slug. WordPress builds it from your post title, and you can edit it before publishing. The structure in front of it comes from your permalink settings.

4. Query String: ?ref=newsletter

A query string starts with a ? and passes extra information to the page as key=value pairs. Search results, product filters and tracking tags all use them. Multiple pairs are joined with &.
The page content usually stays the same. That’s why too many parameters can create duplicate versions of the same page, which we cover in the SEO section.

5. Fragment: #parts

A fragment starts with # and jumps the browser to a specific spot on the page, usually a heading with a matching ID. The browser handles it on its own and doesn’t send it to the server. Search engines generally treat /page and /page#section as the same page.

Types of URLs

URLs can be grouped in two ways: by how they’re built (static or dynamic) and by how they’re written (absolute or relative).

Static vs. Dynamic URLs

A static URL is readable and stays the same every time, like https://example.com/about-us/. A dynamic URL is built from parameters that tell the site what to load, like https://example.com/product?id=12345.
Search engines can crawl and index both. The real SEO problem with dynamic URLs is that one page can end up with many parameter variations, which creates duplicates. Readable URLs are also easier to share, remember and trust.

WordPress shows this difference in Settings > Permalinks. The “Plain” option produces dynamic URLs like ?p=123. “Post name” produces readable ones like /how-urls-work/. For nearly every site, “Post name” is the right choice.

Absolute vs. Relative URLs

An absolute URL includes everything: protocol, domain and path, like https://example.com/contact-us/. A relative URL leaves out the protocol and domain, like /contact-us/, and the browser fills in the rest from the page you’re on.
Use absolute URLs in canonical tags, sitemaps and schema, where search engines need the full address. Relative links work fine inside your own content. We use them during staging and migrations because they don’t break when the domain changes.
Type Example Best for
Static /about-us/ Pages and posts you want people to
find and share
Dynamic /product?id=12345 Search results, filters,
user-specific content
Absolute https://example.com/contact-us/ Canonical tags, sitemaps, schema,
external links
Relative /contact-us/ Internal links within the same site

How URLs Affect SEO

A URL is a small ranking signal, not a big one. Its real value is clarity. A readable address helps search engines understand a page, helps visitors trust the link before they click, and keeps your pages from competing with their own duplicates.

What Makes a URL SEO-Friendly

Compare these two addresses for the same page:
  • Good: https://example.com/how-urls-work/
  • Bad: https://example.com/page.php?id=12345&session=xyz
The first tells you what you’ll find before you click. The second tells you nothing. Here’s what separates them:
  • Short and descriptive: Use the words people would search for, and cut filler like “the,” “and,” or “a.”
  • Hyphens between words: Google recommends hyphens to separate words, and they’re easier for people to read than underscores.
  • Lowercase only: The path part of a URL can be case-sensitive, so /Page and /page may load as two different addresses.
  • Plain characters: Stick to letters, numbers and hyphens. Spaces and symbols get encoded (a space becomes %20), which makes URLs harder to read.
  • One keyword, used naturally: Match the page topic, as in /how-urls-work/, without repeating it.

URL words are a light signal, so don’t stuff them. Getting the on-page basics right matters more, and our on-page SEO guide for WordPress covers them.

Common URL Mistakes and How to Fix Them

Mistake Why it hurts Fix
Long URLs stuffed with extra words Hard to read, truncated in search results
and when shared
Cut to the core topic
Session IDs or tracking tags in internal links Creates duplicate versions and skews analytics Link to the plain URL
Dates or numbers in evergreen URLs
(/2022/03/…)
Makes updated content look outdated Use a descriptive slug without dates

Duplicate URLs: One Page, Many Addresses

Search engines treat each distinct address as a separate page, even when the content is identical. One page can easily end up reachable at several addresses:
  • http:// and https://
  • With and without www
  • With and without a trailing slash
  • With added parameters like ?ref=newsletter

Pick one version and send every other one to it with a 301 redirect. Add a canonical tag on the page too, so search engines know which version you prefer. We cover both in the sections below.

How to Create a Good URL in WordPress

1. Go to Settings > Permalinks and choose Post name. Do this before you publish anything.

2. When you write a post, edit the slug. WordPress generates it from your full title, so trim it to the main topic.

3. Check the slug for stray words, dates and special characters.

4. Don’t change the slug after publishing unless you have to. If you do, set up a 301 redirect from the old address.

How to Create a Good URL in WordPress
WordPress often redirects an old post slug on its own, but we always test the old address after a change instead of assuming it works.

URL Redirects and When to Use Them

A redirect sends visitors and search engines from one URL to another automatically. Without one, a changed address leads to a 404 error, and every link and ranking pointing to the old page goes with it.

301 vs. 302: Which Redirect to Use

The choice comes down to one question: is the move permanent?
\Detail 301 (Permanent) 302 (Temporary)
Meaning The page has moved for good The page is away for now and will return
What Google shows in results The new URL The original URL
Use it for Site migrations, domain changes, HTTP to HTTPS, merged or deleted pages, new slugs Maintenance pages, A/B tests,
short-term campaigns, items
temporarily out of stock
Using the wrong one sends the opposite instruction. A 302 on a page that moved permanently tells Google to keep the old address, so your new URL can take longer to show up. Google may eventually treat a long-running 302 as permanent, but don’t count on it.
Example: You rename /old-blog/ to /new-blog/. A 301 from the old address to the new one tells search engines the new URL is the permanent home.
The redirect mistake we see most often after a redesign is a 302 left in place from a staging setup, so we check the redirect type on every old URL before launch.

How to Set Up Redirects in WordPress

  • Changed a slug? Add a 301 from the old address to the new one right away.
  • Redesign or migration? Build a list of old URLs and their new matches before launch, and redirect each one to the closest relevant page. This is a standard step in our WordPress development projects.
  • Where to set them up: a redirect plugin such as Redirection, your host’s server settings, or your SEO plugin if it includes a redirect manager.
Test every old URL after you set it up. A redirect that loads the wrong page is worse than none.

Redirect Mistakes to Avoid

  • Redirect chains: A > B > C is slower and harder to crawl. Point A straight to C.
  • Redirecting everything to the homepage: If the old page has no equivalent, a relevant category or a clear 404 is better than a bulk redirect to the homepage.
  • Removing redirects too soon: Keep a permanent redirect in place for at least a year, and longer if the old URL still gets links or traffic.
  • Using the wrong type by default: Some tools let you pick the redirect type, and the default isn’t always 301. Check the setting before you save.

Advanced URL Features

Once the basics are in place, two features keep a URL setup tidy as your site grows: canonical tags and campaign tracking tags.

Canonical URLs

A canonical URL is the version of a page you want search engines to index. A canonical tag is a small line in the page’s code that names it.

You’ll want one whenever the same content can load at more than one address. Product pages in multiple categories are a common case, and so are filtered or sorted pages, and parameters added by tracking links.

For example, if a product loads at both example.com/product-a/ and example.com/shop/product-a/, the canonical tag on both points to the one you prefer.
Two things to know:
  • It’s a strong signal, not a command. Google usually follows it, but it can choose a different version if other signals disagree.
  • It’s not a redirect. A redirect sends visitors to the preferred URL. A canonical tag leaves both addresses reachable and only tells search engines which one counts.
In WordPress, SEO plugins like Yoast add a self-referencing canonical to each page by default, so most sites only need to adjust it for special cases.

UTM Codes and Tracking Parameters

Tracking parameters are extra tags added to the end of a URL to show where a visitor came from. They don’t change the page content. UTM codes are the most common kind, and Google Analytics reads them automatically.
An email campaign link might look like this:
https://example.com/product-page/?utm_source=newsletter&utm_medium=email&utm_campaign=holiday_sale
Parameter What it tells you Example
utm_source Where the visit came from newsletter,
linkedin
utm_medium The type of channel email,
social,
cpc
utm_campaign Which campaign it belongs to holiday_sale
Use UTM codes on links you share outside your site: newsletters, social posts, ads and partner links. A few habits keep your data clean:
  • Never use them on internal links. A UTM tag on a link inside your own site can replace the original traffic source in your reports.
  • Use lowercase and a naming pattern. Analytics treats Email and email as different values.
  • Keep the canonical tag in place. Tagged URLs are copies of the same page, and the canonical tag keeps them from competing with the original.

Conclusion

Knowing how URLs work comes down to a short checklist. Each address has a protocol and a domain name, usually a path, and sometimes a query string or fragment. Search engines and visitors both prefer addresses that are short, readable and stable.
Here is what to take away:
  • Use HTTPS, and keep one version of your domain (with or without www).
  • Set WordPress permalinks to Post name before you publish.
  • Write short, lowercase slugs with hyphens and one clear keyword.
  • Use a 301 redirect whenever a live URL changes for good.
  • Add canonical tags for duplicates, and keep UTM tags off internal links.

A URL is what other people link to, save and share. Changing it later costs more than getting it right at the start. For a broader look at what else helps your pages rank, see our guide to optimizing WordPress content for SEO.

If you’re planning a new site or a redesign and want the URL structure and redirects handled correctly from day one, tell us about your project.

FAQ

What are the parts of a URL?

A URL has up to seven parts: a protocol (https://), a subdomain (www), a second-level domain (example), a top-level domain (.com), a path (/page-name/), and optional extras like a query string (?id=1) and a fragment (#section). The protocol and domain name are required. Everything else points to something more specific.

What is the difference between a domain name and a URL?

A domain name is the address of a website, like kiwistic.com. A URL is the full address of one specific page or file on that website, including the protocol and path, like https://kiwistic.com/wordpress-maintenance/. Every URL contains a domain name, but a domain name alone is not a complete URL.

What is a good URL structure for SEO?

A good URL is short, readable and stable. Use lowercase letters, hyphens between words, and one clear keyword, like /how-urls-work/. Avoid dates, session IDs, and special characters. In WordPress, set permalinks to Post name before publishing, so every page gets a clean address from the start.

What is the difference between a 301 and a 302 redirect?

A 301 redirect signals a permanent move, so search engines show the new URL in results. A 302 redirect signals a temporary move, so search engines keep showing the original URL. Use a 301 when a page has moved for good and a 302 for maintenance pages, tests, or short-term changes.

Do URLs affect SEO rankings?

Yes, but only slightly. Keywords in a URL are a light signal. The bigger SEO value is indirect: readable URLs are easier to understand and trust, and a consistent structure prevents duplicate pages. Changing URLs without 301 redirects is where sites lose real traffic, so stability matters more than keyword placement.

Should I change my WordPress permalink structure after publishing?

Avoid it if you can. Changing a live URL breaks existing links and can drop traffic unless you add a 301 redirect from every old address to its new one. If you must change it, redirect each old URL, update internal links, and test the old addresses afterward.

Ognjen Velickovic

WordPress Developer & Product Manager at Kiwistic. I build and maintain WordPress sites for small businesses and troubleshoot everything from login lockouts to security issues. These guides come from real experience, so you don't have to figure it out alone.

You May Also Like…