Your web page’s Uniform Resource Locator (URL)—its address on the internet—may seem like a minor detail, but its structure can affect how easily visitors and search engines understand what they’ll find on the page.
While visitors don’t pay attention to the information contained in URLs, search engines like Google use them to understand your site’s organization and content.
Think of URLs as another opportunity for search engine optimization (SEO) rather than a technical footnote. This guide covers how to structure your URLs, optimize URL slugs, and create readable, user-friendly web addresses.
What is URL structure?
URL structure is the way the parts of a web address are arranged. Each part serves a different purpose, from identifying the website to specifying a given page on a website. Take this ecommerce example:
https://whitneysmodeltrains.myshopify.com/collections/ho-locomotives
This is how it breaks down, from left to right:
- Protocol. The https:// portion of the URL. It defines how data is transmitted between a web browser and a server. The “s” stands for “secure,” indicating that the communication is encrypted.
- Domain name. The domain name identifies the website. In this case, whitneysmodeltrains.myshopify.com is a subdomain of myshopify.com. A custom domain, such as whitneysmodeltrains.com, gives your store its own branded address.
- Path and slug. The path identifies a page’s location within the website, such as /collections/ho-locomotives. A URL slug is the final, descriptive part of that path: ho-locomotives in this example. Shopify calls the slug the URL handle, which you can edit in the search engine listing settings for products, collections, and pages.
- Query string/parameters. These snippets are often added to the end of URLs to filter, track, or identify product variants. A question mark (?) separates them from the URL path, as in /collections/ho-locomotives?style=diesel.
Why does URL structure matter for SEO?
A consistent URL structure helps search engines crawl your pages and helps visitors understand where a link leads. According to Google’s SEO Starter Guide, keywords in a domain name or URL path have little direct effect on rankings.
A well-organized URL structure offers several benefits:
- Communicates site structure. A logical URL path can describe how content is organized. For example, /trains/locomotives/steam-engines places steam engines within the locomotives category. Grouping similar pages into directories can help Google determine how often to crawl them.
- Describes page content. Relevant words in a URL help readers recognize the topic and understand where a link leads before opening the page.
- Improves crawlability. Limiting unnecessary URL variations can reduce the time search engines spend crawling duplicate or similar pages.
- Reduces duplication issues. Filters, session IDs, and tracking parameters can create multiple URLs for the same content. Duplicate content doesn’t trigger a Google penalty, but it can waste crawling resources. Canonical tags signal which URL search engines should treat as preferred.
Shopify automatically uses consistent, fixed paths, including /products/ for product pages and /collections/ for collection pages. Stores control the handle that follows each path.
In /collections/ho-locomotives, for example, you can edit ho-locomotives; the /collections/ prefix stays fixed.
Non-SEO vs. SEO URL example
Here is the difference between an SEO optimized URL and a non-optimized URL for a product page from an imaginary ecommerce store, Suits Emporium:
Non-SEO URL
First, the bad and ugly. Here’s a not-so-friendly URL:
https://suitsemporium.com/prod?id=98876451&sid=variant_03
There is no product category, no slug describing the product, and it’s nearly unreadable. Visitors can’t easily tell what the page contains from the address alone.
SEO-friendly URL
Here’s a cleaner, SEO-friendly version:
https://suitsemporium.com/products/mens-double-breasted-suit
Why does this work better? The descriptive slug tells visitors what product they'll find on the page.
Search engines can also use the words in the URL to more easily understand what the specific page represents. SEO-friendly URLs like this improve search visibility and encourage more clicks.
7 best practices for creating an SEO URL
Review URL handles before publishing a page, and set up redirects whenever you change an existing address. Use these best practices to optimize your URLs:
- Use keywords to define the page
- Keep URLs short
- Prioritize readability
- Use hyphens, not underscores
- Use lowercase letters to prevent error codes
- Eliminate unnecessary stop and filler words
- Handle URL parameters with care
1. Use keywords to define the page
Include keywords in your URL that reflect the product name or blog topic. A descriptive URL gives readers a clear indication of the page’s content.
Avoid unnecessary repeating keywords in the slug. Google’s spam policies warn against excessive keyword repetition to manipulate rankings. Sites that violate these policies can rank lower or disappear from search results. Google detects violations through automated systems and human reviews, which can result in manual actions.
State what the product or category is, using a logical structure:
/collections/buildings-scenery
For a product, the slug can include the brand name and identifying details:
/products/bachmann-church-painted-fully-assembled
Avoid vague identifiers such as /collections/category-899, which tells readers little about the collection. Also remove repetitive or temporary wording, as in /products/new-release-building-new-model-bachmann.
Shopify generates handles from product and collection titles. You can edit them in your Shopify admin, but changing a title after you create the page won’t update its handle.
Review the generated handle before publishing. For an existing page, change it when you need to correct an error or describe the content more accurately.
After changing a handle, create a URL redirect from the old address to the new one:
- Go to Content > Menus > View URL Redirects in your Shopify admin.
- Click Create URL redirect.
- Enter the old path in Redirect from and the new path in Redirect to.
- Click Save redirect.
Shopify redirects work when the old address no longer serves an active page. Test the old link after saving, and update internal links to point directly to the new address.
2. Keep URLs short
Keep the words needed to describe the page clearly. Google’s URL structure guidance doesn’t have an ideal URL length or recommend a 50 to 60 character target.
A concise path is easy to scan:
/buildings/sheds
Extra directories and promotional wording make the same destination harder to identify:
/buildings/outbuildings/2025/top-rated/easy-to-assemble/sheds
Retain details that identify the product, such as its model number. Remove words that repeat information or describe a temporary promotion.
3. Prioritize readability
Design your URLs for people first. Steer clear of jargon, unfamiliar abbreviations, and repeated keywords. Readers need to recognize the product or topic from the address.
A clear product path:
/products/spicy-seitan-strips
A cluttered version:
/products/spicy-strips-seitan-w-pepper-4g
For multilingual SEO, Shopify Translate & Adapt lets you translate URL handles. Select the language and content in the app, then enter the translation in the URL handle field.
For example, a Spanish version of /products/model-train could use /es/products/tren-a-escala. The descriptive handle changes, while Shopify’s /products/ path stays fixed.
4. Use hyphens, not underscores
When separating words in a URL slug, use hyphens (-). Google recommends hyphens because they help readers and search engines identify separate concepts.
Underscores have historically been used to keep terms together, such as words in programming function names.
Recommended:
/products/organic-cotton-t-shirt
Avoid:
/products/organic_cotton_t-shirt
5. Use lowercase letters to prevent error codes
Domain names are not case-sensitive, but URL paths can be. Google treats /New-Products and /new-products as different URLs. Depending on the server, a case mismatch can lead to a 404 error or a second address for the same content.
Shopify generates lowercase URL handles from resource titles. Copy the saved handle exactly when creating links and redirects.
Use this consistent format:
/products/organic-cotton-t-shirt
Avoid introducing a different version in your links:
/products/Organic-Cotton-T-Shirt
6. Eliminate unnecessary stop and filler words
Stop words include “a,” “the,” “and,” and “of.” Remove them from a slug when it shortens the address and preserves meaning.
But don’t remove every stop word automatically. Short words can change what a searcher means, so treating them all as words Google ignores is inaccurate.
For example, /pages/how-to-build-a-model-railway reads naturally. Removing every common word would make the phrase harder to follow.
Dates need a separate decision. A year in an evergreen slug can make updated content look outdated. Replacing that year also changes the URL and requires a redirect to keep old links working.
For an ongoing product listing, omit an unnecessary publication date:
/products/bachmann-pennsylvanian
Instead of:
/products/bachmann-the-pennsylvanian-aug-2025
Keep a date when it identifies the subject, such as a specific annual report.
7. Handle URL parameters with care
URL parameters are strings added to an address to filter, track, or select product variants. They can create multiple URLs for identical or similar content.
A canonical tag identifies the preferred URL for those pages. Google treats it as a strong signal rather than a directive, so it can select a different canonical URL. According to the 2025 Web Almanac, 68% of desktop pages and 67% of mobile pages use canonical tags, up from 65% for both in 2024.
Shopify themes that include the standard canonical tag, <link rel="canonical" href="{{ canonical_url }}">, typically point search engines to the main product URL instead of any variants. Similarly, filtered collection URLs typically point to the main collection URL.
For example:
| Page URL path | Expected canonical path |
|---|---|
| /collections/locomotives?filter.v.option.color=silver | /collections/locomotives |
| /products/model-locomotive?variant=123456789 | /products/model-locomotive |
These examples assume the theme uses Shopify’s standard canonical output. Custom theme code or apps can alter the result, so check the actual pages.
View the page source and search for rel="canonical" to inspect the declared URL. Then use Google Search Console’s URL Inspection tool to check Page indexing > Google-selected canonical.
UGL slug optimization FAQ
What is an example of a URL slug?
In https://example.com/collections/ho-locomotives, the URL slug is ho-locomotives. It’s the final part of the URL path, which identifies the page. Shopify calls this the URL handle.
What is an example of an SEO slug?
An SEO slug could be organic-cotton-t-shirt for a product page selling that item. It describes the product with relevant words, separates them with hyphens, and leaves out repetitive or unnecessary wording.
What is an SEO URL?
An SEO URL is a web address structured to help people and search engines understand its destination. It uses descriptive words and consistent formatting. Keywords in URLs have little direct effect on Google rankings, so prioritize accurate descriptions and readability.
What is an example of a URL for SEO?
https://example.com/collections/model-trains is an example of an SEO-friendly URL. It uses HTTPS, identifies the page as a collection, and describes its contents with the slug model-trains. The words are lowercase and separated by a hyphen.
How do you check your SEO URL?
Check that the URL describes the page, uses lowercase letters and hyphens, and loads correctly. Verify that any redirects and canonical tags point to the intended address. In Google Search Console’s URL Inspection tool, check the page’s indexing status and Google-selected canonical URL.






