Your URLs are the first thing Google reads about a page, and often the first thing a person judges before they click. Get them wrong and you bury keywords, split ranking signals across duplicate versions, and hand visitors a messy string they will not trust. Most guides only cover half the picture: the parts of a URL, or the SEO rules, but rarely both plus how to actually change them. This guide walks through the full anatomy of a URL, the main types, the best practices that make URLs search-friendly, and how to edit them in the CMS you already use.
What is URL structure?
URL structure is the way a web address is organised and formatted, from the protocol at the front to the optional query and fragment at the end, so that browsers, people and search engines can find and understand a resource. URL stands for Uniform Resource Locator, which is simply the address of one specific page or file on the web. A clean, logical structure makes that address easy to read and easy to crawl.
It helps to separate two ideas that sound alike. URL structure is the format of a single address. Site structure is how all your pages relate to each other. They work together, but this guide is about the address itself.
Why URL structure matters for SEO and users
A good URL pulls weight in three places at once.
Search relevance. Google reads the words in your URL to help work out what a page is about. Descriptive words give it useful context, which is why a readable path tends to beat a string of ID numbers.
Clicks and sharing. People look at a URL before they visit. A short, clear address is easier to read, trust, type and share, whether it sits in a search result, a message or a printed flyer.
Crawling and hierarchy. A logical folder structure helps search engines crawl your site efficiently and understand how pages fit together. Messy, duplicated URLs waste crawl budget and can keep good pages out of the index. If you want that groundwork handled properly, our AI SEO services build it into the technical setup.
URL format: the full syntax at a glance
Every URL follows the same underlying template. Not every part is always present, but the order never changes:
scheme://[userinfo@]host[:port]/path?query#fragment
Here is a real example with the parts labelled:
https://www.example.com.sg/blog/url-structure?ref=newsletter#faq
| | | | |
scheme host subfolder slug query fragment
Only two parts are truly required for a working web address: the scheme and the host (domain). Everything else is optional and depends on what the page needs. The sections below break down each part in turn.
The anatomy of a URL: every part of a URL explained
Ask five sources how many parts a URL has and you will get four different answers. That is because the same address can be split coarsely or finely. There are four core parts almost everyone agrees on, which are the scheme, the domain, the path and the query. Split the domain into subdomain and top-level domain, and separate the port, query and fragment, and you land at eight to ten named parts. Nothing changes about the URL; only the level of detail does.
Here is the full set, from front to back.
|
Part |
Example |
Required? |
|
Scheme |
https |
Yes |
|
Subdomain |
www or blog |
No |
|
Domain name |
example |
Yes |
|
Top-level domain |
.com.sg |
Yes (part of host) |
|
Port |
:443 |
No (usually hidden) |
|
Path (subfolder + slug) |
/blog/url-structure |
No |
|
Query string |
?ref=newsletter |
No |
|
Fragment |
#faq |
No |
Scheme (protocol)
The scheme sits at the very front and tells the browser which protocol to use to fetch the resource. For websites you will almost always see HTTP or, far more commonly now, HTTPS. HTTPS is the secure version that encrypts data as it moves between the browser and the server.
You may also meet other schemes such as mailto: (which opens an email client) and ftp: (an older file-transfer protocol that modern browsers no longer support for loading page resources). HTTPS matters beyond security, and we cover its ranking role further down.
Authority, subdomain and domain name
After the scheme and the :// separator comes the authority. This is the domain, and optionally a port. The domain is made of a few pieces.
The subdomain appears before the main name, like www or blog in blog.example.com. Sites often use subdomains to split off distinct sections such as a blog, a help centre or a regional version.
The domain name is the main, memorable part, like example in www.example.com. It acts as the name of your brand and is unique to you.
Top-level domain (TLD)
The top-level domain is the extension after the domain name, such as .com, .org or .net. These general TLDs signal the type of organisation, while country-code TLDs signal location: .sg for Singapore, .uk for the United Kingdom, .de for Germany.
Choosing a relevant TLD sends a small signal about who you serve. A Singapore business targeting local customers may benefit from a .sg or .com.sg address, which pairs well with a solid local SEO setup.
Port
The port is a number that tells the server which “gate” to use for the connection. HTTP uses port 80 and HTTPS uses port 443 by default, so the browser fills these in automatically and you rarely see them. A port only appears in the URL when a server uses a non-standard one, in which case it becomes mandatory.
Path (subfolder/subdirectory and slug)
The path comes after the domain and shows where a page lives on your site. It usually has two parts.
A subfolder (also called a subdirectory) groups related content, like /blog in example.com/blog/url-structure. A slug is the final part that names the specific page, like url-structure. Slugs use words separated by hyphens so both people and search engines can read them.
Compare a clean path with a messy one:
Clean: example.com/blog/url-structure
Messy: example.com/index.php?id=4471&cat=3a5ebc944f
The first tells you exactly what the page is about. The second tells you nothing.
Query string and parameters
A query string starts with a question mark (?) and passes extra data to the server. It is built from parameters, which are key and value pairs joined by an equals sign, like ?category=shoes. You can chain several together with an ampersand (&), as in ?category=shoes&sort=newest.
It helps to keep the two terms straight. The query is the whole string after the ?. Each parameter is one key-value pair inside it. Parameters are handy for filtering, sorting and tracking campaigns (UTM tags, for example), but left unchecked they can create duplicate pages, which we return to below.
Fragment (anchor)
A fragment, also called an anchor, is the part after a hash symbol (#). It jumps the browser to a specific spot on the page, such as a heading or a video timestamp. In example.com/guide#faq, the #faq scrolls straight to the FAQ section.
One useful detail: the fragment is never sent to the server. The browser handles it entirely on your side, which is why it is used for on-page navigation rather than fetching new content.
Username and password in URLs (rare/deprecated)
You may occasionally see credentials sitting inside a URL, in the form https://username:password@example.com. The username and password go between the :// and the host, separated by a colon and closed with an @ sign.
This is a leftover from HTTP authentication and is now deprecated for security reasons. Anyone who sees the link sees the credentials, so modern sites handle logins in far safer ways. It is worth recognising, but not something you should build into your own URLs.
Types of URLs
Beyond the parts, URLs come in a few types depending on how much of the address they include and what job they do.
Absolute URLs
An absolute URL is the complete address, including the scheme and domain, like https://www.example.com/products/shoes. Because it holds everything needed to locate the resource, it works from anywhere. You will typically use absolute URLs in external links, emails and syndicated content.
Relative URLs
A relative URL includes only the path, such as /products/shoes, and relies on the current page to fill in the missing scheme and domain. Relative URLs are shorter and easier to maintain during site updates and migrations, which makes them popular for internal links.
There are a few relative forms worth knowing. A scheme-relative URL drops only the protocol (//example.com/page). A domain-relative URL starts with a slash and drops the scheme and domain (/page). A path-relative reference points to a sub-resource of the current folder, and a ../ prefix steps back up the folder tree. An anchor-only reference (#section) keeps the current page and jumps to a spot on it.
Canonical URLs
A canonical URL is the version of a page you want search engines to treat as the original when several near-identical versions exist. If example.com/shoes and example.com/shoes?page=1 show the same content, marking the first as canonical tells Google which one to index. This keeps duplicate versions from competing with each other in search.
Vanity URLs
A vanity URL is a short, branded link built to be memorable, like example.com/sale. It usually redirects to a longer, messier address underneath. Vanity URLs are made for marketing, so they read cleanly in ads, on social media and in print. You can create them with a URL shortener or in your CMS with a 301 redirect to the real page.
SEO best practices for URL structure
A valid URL and an SEO-friendly URL are not the same thing. These practices turn a working address into one that helps your rankings and your readers. Treat them as defaults rather than rigid rules.
Use HTTPS, not HTTP
Serve your site over HTTPS, not plain HTTP. Beyond protecting visitor data, Google confirmed HTTPS as a ranking signal back in 2014, though it described the effect as lightweight and affecting fewer than 1% of global queries. Just as important, browsers now flag HTTP pages as “Not Secure”, which can scare visitors away before they read a word. Most hosts provide an SSL certificate, sometimes free.
Keep URLs short and simple
Shorter URLs are easier to read, type, remember and share. Trim unnecessary folders and avoid burying pages many levels deep. As a rough guide, prefer example.com/shoes over example.com/category/products/footwear/mens/shoes.
Use descriptive, keyword-relevant words
Write URLs with plain, specific words that describe the page, and include your target keyword where it fits naturally. Readable words beat long ID numbers because they give both people and search engines useful context. It also helps to avoid dates and sequential numbers in slugs, since those force you to change the URL if you update the content later.
Use hyphens, not underscores, to separate words
Separate words in a slug with hyphens (-), not underscores (_). Google recommends hyphens because they help search engines identify individual concepts in the URL. Underscores tend to join words together, so url_structure can read as a single token rather than two words.
Stick to lowercase letters
Keep every URL in lowercase. URLs can be case-sensitive, which means example.com/About and example.com/about may be treated as two different pages, creating duplicate content. Lowercase-only avoids the problem and reads more cleanly.
Handle parameters carefully
Use parameters only where you need them, such as filtering or campaign tracking, and keep them tidy. When a parameter version duplicates a clean page, add a canonical tag pointing to the primary version. Trimming parameters that do not change the content reduces the risk of duplicate pages competing in search.
Use your audience’s language
Write URL words in the language your audience searches in. Where a URL contains non-ASCII characters, encode them correctly with percent-encoding so browsers and crawlers read them reliably. A URL aimed at a Singapore audience searching in English should use clear English words in the path.
Keep a consistent, logical hierarchy
Pick a URL pattern that mirrors your site structure and stick to it. Consistent folders make your site easier to crawl and easier for visitors to guess where they are. Once a structure is live, avoid reshuffling it without redirects, which we cover in the mistakes section.
How to set or edit your URL structure by CMS
Where you actually change URLs depends on your platform. Here is how the most common content management systems handle it. UI paths change over time, so treat these as a guide and check the current settings in your own dashboard.
WordPress
WordPress controls URL format under Settings > Permalinks. For most sites the “Post name” option gives the cleanest, most SEO-friendly result. You can also edit an individual page or post’s slug directly in the editor before publishing.
Editing slugs with Yoast SEO
With Yoast SEO installed, you edit the slug in the Yoast box below the editor, or in the URL field in the page settings. Keep the slug short and keyword-relevant, and if you change a published slug, set up a redirect from the old one.
Editing slugs with Rank Math
Rank Math works similarly. Open the page, edit the permalink or slug field, and use Rank Math’s redirection module to point the old URL to the new one when you change a live page.
Shopify
Shopify uses URL handles for products, collections, pages and blog posts. You edit the handle in the “Search engine listing” section of each item. Note that Shopify adds fixed prefixes such as /products/ and /collections/, which you cannot remove. When you change a handle on a live product, create a URL redirect so the old link still works. For stores that need this done at scale, our Shopify SEO service handles the structure and redirects together.
Wix
In Wix, you edit a page’s URL slug through the SEO settings for that page in the site menu. The editor shows the full URL so you can keep slugs clean and readable before publishing changes.
Squarespace
Squarespace exposes a URL slug field in each page’s settings. Collection items such as blog posts and products follow the collection’s URL pattern, with the individual slug editable per item.
Webflow
Webflow sets a page’s slug in its page settings, and CMS collection items take their URL from the collection’s structure plus the item slug. You edit both in the Designer or the CMS panel.
Magento / Adobe Commerce
Magento, now Adobe Commerce, uses URL keys for products and categories, managed under the SEO section of each item. URL rewrites let you redirect old URLs to new ones, and a store setting controls whether the category path appears in product URLs.
Common URL structure mistakes to avoid
Even a well-meaning URL can undercut your SEO. Here are the ones that come up most often.
Overly long, deeply nested URLs
Long URLs buried several folders deep are hard to read and share, and they dilute the keywords that matter. Keep paths shallow and trim any folder that does not earn its place.
Stuffing keywords or repeating them
Repeating a keyword to force relevance, like example.com/shoes/mens-shoes/buy-shoes, looks spammy and adds nothing. Use each important word once, where it makes sense.
Using underscores, spaces or special characters
Underscores join words, spaces become messy %20 codes, and special characters can break links. Stick to hyphens and plain lowercase letters so every URL stays clean and portable.
Uppercase and inconsistent casing
Mixed-case URLs risk creating duplicate pages, since the server may treat /Page and /page as different. Pick lowercase and apply it everywhere.
Leaving unnecessary parameters and session IDs
Referral tags, sort parameters and session IDs can generate a flood of near-identical URLs. Session IDs in particular create a unique URL per visit, which wastes crawl budget and splits ranking signals. Trim what you can and canonicalise the rest.
Faceted-navigation and calendar “infinite spaces”
Filter systems that combine options (“beach hotels with a pool and a gym”) can multiply into thousands of URL variations. Dynamic calendars that link endlessly to future dates do the same. Google flags these as crawl traps and suggests blocking the problem URLs with robots.txt or a nofollow on runaway links.
Changing URLs without 301 redirects
If you change a URL and do not redirect the old one, you lose the ranking signals it built up and send visitors to a dead page. Always map old URLs to new ones with 301 redirects. Handling this during a site change is part of ongoing website maintenance.
How to audit and fix your existing URLs
You do not need to fix every URL by hand. A simple, repeatable workflow catches the common problems.
Start by crawling your site with an SEO crawler to pull a full list of URLs. Then flag the ones that break the rules above: underscores, uppercase letters, over-long paths, and too many parameters. Fix the worst offenders, and set a 301 redirect from every old URL to its replacement so you keep the equity and avoid broken links. Finally, recrawl to confirm the fixes are live and nothing new has slipped in.
If you would rather have this checked properly, our SEO audit reviews your URLs alongside the rest of your technical setup, and our wider SEO services can put the fixes in place.
Frequently Asked Questions
The five main parts of a URL are the scheme (such as https), the domain, the path, the query string and the fragment. Some breakdowns split these further into eight or more named parts, but these five cover the structure of most addresses.
URL structure is the standard order in which a web address is arranged: scheme://host/path?query#fragment. The scheme and host are required, while the path, query and fragment are optional and depend on the specific page.
A URL format is the syntax every web address follows, starting with the scheme, then the host, then an optional path, query and fragment. A typical format looks like https://www.example.com/path?key=value#section.
The four core parts of a URL are the scheme, the domain, the path and the query. This is the simplest useful breakdown; adding the subdomain, port and fragment gives the fuller eight-to-ten-part view.
URL stands for Uniform Resource Locator. It is the unique address used to locate a specific page, image or file on the internet.
URL structure influences SEO but it is a minor factor rather than a major one. HTTPS is a confirmed, lightweight ranking signal, and descriptive URLs give Google helpful context, but content quality and relevance carry far more weight.
Final thoughts
Clean URLs are one of the simplest technical wins in SEO. When you get the anatomy right, pick the correct type for the job, follow the best practices and set the structure properly in your CMS, you give both search engines and visitors an address they can read and trust.
Take a look at a handful of your own URLs with this guide open. If you spot underscores, capitals or a trail of parameters, you have found your first fixes. If you would like a second pair of eyes, our team is happy to help you sort them out.





