URL SEO: How to Write SEO-Friendly URLs and Slugs, and When to Leave Them Alone
Good URL SEO means a short, readable path in lowercase, with words separated by hyphens, as few parameters as possible and one stable address for every page. Google says keywords in the URL path have hardly any ranking effect on their own, so clarity and stability matter more than squeezing a keyword in.
By Raúl Díaz, founder of Slibur
13 min read

In this article
Most damage done through URLs comes from somewhere else: the same page answering at five addresses, a slug that has to change every January, or a redesign that rewrites every path without redirects. AI assistants have added a new source of variants, because the links in ChatGPT answers carry their own tracking tag. A clean URL is only the technical floor, though. Whether those assistants cite the page behind it is what an AI search optimization tool tracks.
What makes a URL SEO-friendly, and what it does not do
A URL has five parts worth separating. Take this one:
https://example.com/guides/trail-running-shoes?color=blue#sizing
- Protocol and host:
https://example.com. One protocol and one hostname, with or without www, never both. - Folders:
/guides/, which group pages by section. - Slug:
trail-running-shoes, the part that names this page. - Parameters:
?color=blue, everything after the question mark. - Fragment:
#sizing, a spot inside the page that the browser handles on its own.
SEO-friendly means every one of those parts is predictable. A person can read the URL and guess what the page is, and a crawler finds exactly one address for each piece of content.
How much the URL helps rankings
Very little, according to Google. Its SEO starter guide (opens in a new tab) puts it on its list of things not to worry about: "From a ranking perspective, the keywords in the name of the domain (or URL path) alone have hardly any effect beyond appearing in breadcrumbs."
John Mueller of Google repeated the point on Bluesky in January 2025, as Search Engine Roundtable reported. He wrote that "the URL alone brings minimal additional "signal" for search engines" and that even changing from ?id=12345 to /cheese would not be a big or noticeable thing on its own.
Where a good URL still pays off
- Desktop results. Google shows the domain plus a breadcrumb, and the starter guide says Google "learns breadcrumbs automatically based on the words in the URL." On phones the breadcrumb is gone: since Google's announcement of January 23, 2025, mobile results show only the domain, because the breadcrumb "gets cut off on smaller screens."
- Bare links. In an email, a chat or a forum post, the URL is often the only description a reader gets before clicking.
- Consolidation. When every link points at one address, signals are not split across variants.
- Maintenance. A slug that never needs to change is a redirect nobody has to write.
How to write a URL slug: seven rules
1. Describe the page in the reader's words
Google's URL structure guidelines (opens in a new tab) put it plainly: "When possible, use readable words rather than long ID numbers in your URLs." Use the language of your audience, including transliterated words where that is how people write them. Characters outside ASCII are fine, but Google says they "should be percent encoded" in the links you write.
Start from the topic, not from the full title. A post called "How to Choose Trail Running Shoes for Wet Weather" can live at /trail-running-shoes-wet-weather.
2. Separate words with hyphens
Google recommends hyphens over underscores "as it helps users and search engines better identify concepts in the URL." Underscores are what programmers use to keep words together, as in format_date, while a hyphen clearly marks where one word ends. Joined words like /greendress are on Google's list of what not to do.
3. Use lowercase only
URLs are case sensitive. Google treats /APPLE and /apple as two distinct URLs with their own content. If your server returns the same page for both, you have built a duplicate, and Google's advice is to "convert all text to the same case." Lowercase is the safe convention, with a redirect from any mixed-case request.
4. Keep it short without losing the meaning
Google publishes no ideal length. The "three to five words" rule repeated in SEO posts does not come from its documentation, and the hard limits are far away: the sitemap protocol at sitemaps.org says a URL "must be less than 2,048 characters."
Short slugs are easier to read, quote and remember. Drop words that add nothing, such as "a", "the" or "of". Keep the ones that carry meaning: /shoes-without-laces and /shoes-laces are not the same page. And use the main term once. /seo-services-best-seo-agency-seo reads as spam to people before any algorithm sees it.
5. Leave out anything that will change
Dates, years, counts and prices age. /best-crm-2026 needs a redirect next January, and /9-email-templates is wrong the day you add a tenth. The exception is news and dated archives, where the date is part of what the page is.
6. Skip spaces and special characters
A space turns into %20. Commas, colons, semicolons and quotes are either reserved characters or hard to read, and Mueller has said he generally recommends avoiding them in URLs. Letters, digits and hyphens are all a slug needs.
7. Keep personal data out of the URL
URLs end up in browser history, server logs, analytics reports and shared links. Email addresses, names and session tokens do not belong there. Google Analytics is strict about it: its rules on personal data (opens in a new tab) say "Both the URL path and parameters must be free of PII."
| Instead of | Write | Why |
|---|---|---|
/index.php?id=7&cat=3 | /shoes/trail-running | Words instead of IDs |
/Blog/SEO_Tips | /blog/seo-tips | Lowercase and hyphens |
/best-crm-software-2026 | /best-crm-software | No year to redirect |
/the-complete-list-of-crm-tools-for-a-small-business | /crm-small-business | Shorter, same meaning |
/thank-you?email=jane@example.com | /thank-you | No personal data |
A good slug and a good title tag agree on what the page is about, even when they don't use the same words.
Folders and URL structure
Use folders to group, not to decorate
The starter guide explains why folders matter on bigger sites: "If you have more than a few thousand URLs on your site, how you organize your content may have effects on how Google crawls and indexes your site." Grouping similar topics in directories "can help Google learn how often the URLs in individual directories change."
A folder earns its place when it says something true about every page inside it. /blog/, /running/ and /de/ do. A folder that only copies a menu label adds length and has to change whenever the menu does.
| Site | Pattern | Example |
|---|---|---|
| Blog or content site | /blog/topic | /blog/trail-running-shoes |
| Online store | /category/product, or /product | /running/trail-shoe |
| Local services | /service/city | /plumbing/austin |
| International | /country/ or /language/ | /de/, /fr/ |
Some store platforms create both /product and /category/product for the same item. Pick one, link to it and point the other at it with a canonical; the ecommerce SEO guide covers the rest of that setup. For several countries, Google suggests a structure that makes geotargeting easy, such as a country domain or a country subdirectory, which is where an international SEO audit starts.
On subdomains against subdirectories, Google's starter guide is short: "From a business point of view, do whatever makes sense for your business." Google gives no maximum folder depth either. Keep it as shallow as the content allows, because a page five folders deep is usually also hard to reach from the navigation.
One page, one URL: slashes, case and www
One page can answer at many addresses: http and https, www and the bare domain, with and without a trailing slash, upper and lower case. Google's 2010 post on trailing slashes says it "treats each URL above separately (and equally)", so /page and /page/ are two URLs. The only exception is the root, where example.com and example.com/ are the same thing. Choose one form, send the others to it with a 301 redirect, and use the chosen form everywhere you control: internal links, canonicals and sitemaps.
URL parameters: when one page becomes many URLs
Parameters are fine when they change what the page shows, as filters, sorting, pagination and site search do. They turn into a problem when they multiply copies of the same content. Google's URL guidelines name the usual causes: filters that combine without limit, irrelevant parameters such as referral tags and sort orders, session IDs and calendars with endless future dates.
Google's own guidance for parameters that do change the content:
- Use
=between a key and its value and&between parameters, not commas or semicolons. - Trim "parameters that don't change the content."
- Keep filters in one fixed order with no repeats. The faceted navigation guide asks that "the logical order of the filters always stays the same and that no duplicate filters can exist."
- Return a 404 when a filter combination has no results.
- Avoid session IDs in URLs and "consider using cookies instead."
- Block crawl-only spaces you never want indexed, such as internal search results, in robots.txt.
There is no Search Console setting for this anymore. Google announced on March 28, 2022 that it was retiring the URL Parameters tool, because only about 1% of the configurations in it were useful for crawling, and said its crawlers "will learn how to deal with URL parameters automatically."
Tracking parameters are a canonical problem, not a penalty
Tracking tags like utm_source, gclid or srsltid leave the page identical and create a new URL string. Google's canonicalization page uses a gclid address as its own example of a duplicate. The starter guide is clear that "Having duplicate content on your site is not a violation of our spam policies," so the risk is not a penalty. The risk is that Google picks the tagged copy as the canonical, or spends crawling on copies.
Some tags arrive without you. Google's srsltid comes from Merchant Center auto-tagging, and in 2024 site owners complained that Google listed their pages with it attached. Mueller said it "doesn't affect crawling, indexing, or ranking" and that a rel=canonical "pointing at the preferred URL" handles it. AI assistants now add tags of their own, and the fix is the same.
The parameters AI assistants add to your links
ChatGPT's utm_source=chatgpt.com
When ChatGPT links to a page in an answer, the link usually carries ?utm_source=chatgpt.com so analytics tools can attribute the visit. Reading that tag in GA4, and the weeks it went missing, is covered in the utm_source=chatgpt.com guide. For URL hygiene, what matters is that the tagged link is a second address for the same page, and it travels. People copy it out of the answer into documents, forum threads and social posts, where crawlers can find it.
Limy, an analytics company, reported one result of that. On October 1, 2026, a developer showed that the first organic Google result for a Disney login search pointed to a Disney+ URL ending in ?utm_source=chatgpt.com. Because the utm_source tag overrides the referrer in GA4, people who clicked that Google result were counted as ChatGPT visits.
Text fragments in Google's AI answers
Google's AI Mode often links to a highlighted passage rather than to the top of a page. It does this with a text fragment (opens in a new tab), #:~:text= followed by the quoted words. A Pillarbase study published on Search Engine Land counted 15,699,298 AI Mode citations over a year and found that 47.7% were scroll-to-text highlights.
Fragments create no duplicates. RFC 3986, the URI standard, says the fragment is "separated from the rest of the URI prior to a dereference," so it is handled by the browser, and Google says Search "generally doesn't support URL fragments." There is nothing to clean up. What helps is having passages that answer one question on their own, because those are the ones that get highlighted.
How to keep AI tracking tags from creating duplicates
- Give every indexable page a self-referencing canonical with its absolute, clean URL. The tagged copy then serves the same tag and points back to the clean address. Google's guide to consolidating duplicate URLs (opens in a new tab) calls both redirects and rel="canonical" a strong signal, and a sitemap a weak one.
- Let the tagged URL load normally, with the same page, not an error or a redirect to the home page.
- Don't strip the tag with a server redirect unless the redirect keeps the query string. Analytics Mania lists server redirects as the first reason UTM tags fail: the URL "may change and lose its UTM parameters," and the GA4 tag "cannot collect" them. If you want a clean address bar, remove the parameters in the browser after analytics has read them.
- Don't block utm URLs in robots.txt. Google's words: "Don't use the robots.txt file for canonicalization purposes." A blocked URL can't show Google its canonical.
- Keep tags out of your own links. Internal links, canonicals and the XML sitemap use the clean URL only. Google asks site owners to "link to the canonical URL rather than a duplicate URL."
- Check what Google chose. In Search Console, URL Inspection shows the user-declared canonical next to the Google-selected canonical. If your clean page appears in the Page indexing report as "Duplicate, Google chose different canonical than user", Google thinks another URL makes a better canonical, and that URL is the one to look at.
When not to change a URL
Leave a working URL alone unless the change fixes a real problem. A slug that ranks, earns links and reads well enough is already doing its job, and Mueller's /cheese remark shows how little a rewrite gains on its own. Every change has a cost. Google's site move documentation says to "Expect temporary fluctuation in site ranking during the move," notes that a small to medium-sized website "can take a few weeks for most pages to move," and asks you to keep redirects "generally at least 1 year."
Good reasons to change a URL:
- The slug says something the page no longer says, because the product or the article changed.
- It carries session IDs, tracking tags or IDs that create duplicates.
- You are merging two pages that compete for the same topic.
- The site is moving to HTTPS, a new domain or a platform that forces new paths.
Weak reasons:
- Adding a keyword.
- Shortening a slug that is only long, not wrong.
- Removing a year from a page that still performs. If you update it every year anyway, change it once and drop the year for good.
If you do change it, redirect each old URL straight to its final address. Googlebot can follow up to 10 hops, but Google advises "redirecting to the final destination directly" and keeping any chain at "ideally no more than 3 and fewer than 5." Update internal links, canonicals and sitemaps, then watch Search Console for 404 errors. When the change covers the whole site, it is a migration, and the SEO site migration checklist is the safer path.
What ChatGPT says about URL SEO
We asked ChatGPT four questions on November 17, 2026, from the United States: what makes a URL SEO friendly, whether keywords in the URL still help rankings, whether to change old URLs, and whether parameters like utm_source create duplicate content in Google.
- Every source it cited was Google's own documentation. Three of the four answers cited sources, and all of them pointed to developers.google.com: the starter guide, the URL structure page, the site move guide and two canonicalization pages. No SEO blog, agency or tool vendor appeared. The broad best-practices answer cited nothing at all.
- On keywords, the answer opened with "Yes, but only marginally," quoted Google's "hardly any effect" line and advised against changing URLs only to add a keyword.
- On old URLs, it said "Usually, leave old URLs alone," with a keep-or-change list close to Google's guidance. It added that redirecting unrelated pages to the home page may be treated as a soft 404.
- On parameters, the advice matched Google's: a canonical without tracking tags, clean internal links and sitemaps, no blanket robots.txt block, and care with redirects that drop campaign data before analytics records it.
- None of the four answers mentioned utm_source=chatgpt.com, even though ChatGPT adds that exact tag to the links in its own answers.
- One answer raised a point the popular guides skip: keeping passwords, tokens and personal data out of URLs.
On rule-based technical questions, ChatGPT goes straight to whoever writes the rules. Other sites get room when they add what the official pages lack: worked examples, trade-offs and newer problems like AI tracking tags. To see which pages ChatGPT cites for questions in your own market, run the free ChatGPT sources check.
URL checklist before you publish
- The slug describes the page in the reader's words.
- Lowercase, words joined by hyphens, no spaces or special characters.
- No date, count or price that will go stale.
- Only the folders the content needs, following the same pattern as similar pages.
- One version: https, one hostname, one trailing-slash rule, and redirects from the rest.
- A self-referencing canonical with the clean URL.
- No tracking parameters in internal links, canonicals or the sitemap.
- No personal data in the path or the query string.
Clean URLs earn the click; being named comes first
A tidy URL helps someone decide to click a result or a shared link. An AI answer may have no list of results at all, only a paragraph that names a few brands and cites a few pages.
Slibur asks ChatGPT, Google AI Overviews, Claude, Perplexity and Grok the questions your customers ask, and shows which brands appear, in what position and which sources each answer cites, including whether any of them is your site. An AI visibility tool like that is how you find out whether clean pages are turning into mentions. You can test it on your own questions for 7 days without a card: start the free trial.
Frequently asked questions
What is an SEO-friendly URL?
A URL that a person can read and understand before clicking, and that gives each page exactly one address. In practice that means lowercase letters, words separated by hyphens, a slug that names the topic, only the folders the content needs, and no tracking or session parameters in the version you link to. Google's guidance asks for readable words rather than long ID numbers.
How long should a URL slug be?
Long enough to describe the page and no longer. Google publishes no ideal length, and the common "three to five words" rule does not come from its documentation. The only hard ceiling most sites will ever meet is the sitemap protocol, which requires each URL to be less than 2,048 characters. Cut filler words such as "the" or "of", keep the words that change the meaning, and leave out dates and counts that will go stale.
Should I use hyphens or underscores in URLs?
Hyphens. Google recommends them because they help users and search engines identify where one word ends and the next begins, while underscores are commonly used to keep words together, as in programming. Avoid spaces too, which turn into %20, and joined words like greendress.
Do keywords in the URL help SEO?
Very little. Google's SEO starter guide says keywords in the domain or URL path alone have hardly any effect beyond appearing in breadcrumbs, and John Mueller said in January 2025 that the URL brings minimal additional signal. Use the main term when it describes the page, because it helps readers, but don't change existing URLs just to add one.
Should I change my URLs to make them SEO friendly?
Usually not, if they work. A change means redirects, temporary ranking fluctuation and a few weeks or more for Google to process the move. Change a URL when it is misleading, creates duplicates, or is part of a merge or a site move, and redirect each old address straight to its new one. Google asks you to keep those redirects for at least a year.
Does utm_source=chatgpt.com create duplicate content?
It creates a duplicate URL, not a penalty. The tagged link shows the same page under a second address, and that address spreads when people paste it elsewhere. A self-referencing canonical with the clean URL, clean internal links and a clean sitemap tell Google which version to index. Don't block the tagged URLs in robots.txt, and don't strip the tag with a redirect that drops it before analytics reads it.
Should URLs end with a trailing slash?
Either convention works, as long as you pick one. Google treats /page and /page/ as separate URLs, except at the root of a domain, where both forms are the same. Send the version you don't use to the one you do with a 301 redirect, and use the chosen form in internal links, canonicals and sitemaps.
Are uppercase letters in URLs bad for SEO?
They are a duplicate risk. Google treats /APPLE and /apple as distinct URLs, so if your server shows the same page for both, you have two addresses for one page. Use lowercase everywhere and redirect mixed-case requests to the lowercase version.

Raúl Díaz is the founder of Slibur, the tool that asks ChatGPT, Google AI Overviews, Claude, Perplexity and Grok the questions your customers ask and shows which brands they recommend. He writes about answer engine optimization from the data Slibur collects.