A URL slug is the part of a web address that identifies a specific page, usually after the last slash: in example.com/blog/how-to-write-url-slugs, the slug is how-to-write-url-slugs. A good slug is short, readable, lowercase, uses hyphens between words and describes the page in a few plain words. This guide explains what Google's documentation recommends, the practical rules that follow from it, and examples of good and weak slugs.
Guidance attributed to Google comes from Google Search Central documentation, checked October 3, 2026. Rules marked as our guidance are WriterFlowLab's editorial advice, not Google requirements.
What Google says about URLs
Google's URL structure documentation and SEO Starter Guide make a few clear points:
- Use descriptive URLs. Google recommends readable words rather than long ID numbers, and notes that parts of the URL can be displayed in search results as breadcrumbs, so people can use the URL to judge whether a result is useful.
- Use hyphens to separate words. Google recommends hyphens rather than underscores, because underscores are commonly used to join words that belong together, as in programming names. It also lists words joined together with no separator as not recommended.
- URLs are case sensitive. Google treats /APPLE and /apple as different URLs, and suggests converting text to the same case if your server treats them the same.
- Use your audience's language. If your audience searches in German, for example, use German words in the URL.
- Use as few parameters as you can. Trim parameters that don't change the content.
Google is also clear that slugs are not a ranking shortcut. Its SEO Starter Guide says that, from a ranking perspective, keywords in the domain name or URL path "alone have hardly any effect beyond appearing in breadcrumbs". Write slugs for people first.
Practical rules for good slugs
- Describe the page in a few words. Use the main topic, not the whole title. A reader should be able to guess what the page is about from the slug alone.
- Use lowercase letters. Because URLs are case sensitive, sticking to lowercase avoids two versions of the same address.
- Separate words with hyphens. Not underscores, spaces or nothing at all.
- Leave out punctuation and symbols. Apostrophes, question marks, ampersands and similar characters either get stripped or percent encoded, which makes the URL harder to read.
- Cut filler words where it helps. Words such as "a", "the" and "and" can often go without losing meaning. Our guidance: keep them when removing them makes the slug harder to understand.
- Avoid details that will date. Our guidance: leave out years, version numbers and words such as "new" or "latest" if you plan to update the page, so the slug stays accurate.
- Don't repeat keywords. One clear mention is enough. Repeating the same words is keyword stuffing, which Google's spam policies prohibit, and it makes the URL look untrustworthy.
- Keep it stable. Choose the slug before you publish, and avoid changing it afterwards unless you have a good reason.
How long should a slug be?
Google's documentation does not give an ideal slug length or word count, so be wary of any single "perfect" number. Its guidance points towards short, descriptive URLs without unnecessary parameters. Our guidance: aim for a slug you can read at a glance, usually a handful of words that capture the topic. If a slug needs more than that, it is often repeating the full title rather than summarising it. The word counter shows the character count if you want to compare options.
Good and weak slugs: examples
- Weak: /p?id=4821 Better: /url-slug-guide. Readable words instead of an ID number.
- Weak: /how_to_write_url_slugs Better: /how-to-write-url-slugs. Hyphens, not underscores.
- Weak: /howtowriteurlslugs Better: /how-to-write-url-slugs. Words separated so they can be read.
- Weak: /How-To-Write-URL-Slugs Better: /how-to-write-url-slugs. Lowercase avoids duplicate addresses.
- Weak: /the-ultimate-complete-guide-to-writing-the-best-url-slugs-for-seo-in-2026 Better: /how-to-write-url-slugs. Shorter, and no year to go out of date.
- Weak: /url-slug-url-slugs-seo-url-slug-tips Better: /url-slug-tips. One clear mention instead of keyword stuffing.
- Weak: /untitled-page-3 Better: /contact. Placeholder slugs tell readers nothing.
Turning a title into a slug
Most slugs start from the page title. Shorten the title to its core topic, then format it. Two examples from this site:
- "Title Case vs Sentence Case: When to Use Each" became /title-case-vs-sentence-case.
- "How to Remove Markdown From ChatGPT Text" became /remove-markdown-from-chatgpt-text.
To format a slug quickly, paste the shortened title into our free case converter and choose URL slug. It converts the text to lowercase, removes accents and apostrophes, and replaces spaces and other characters with single hyphens, all in your browser. It produces slugs using unaccented Latin letters and numbers, so for pages in languages that use other scripts, follow Google's advice to use your audience's language and write the slug yourself.
If you are still deciding on the title, our guide to title case vs sentence case covers capitalization, which affects the title but not the lowercase slug.
Changing a slug after publishing
Changing a published slug changes the page's address, so links to the old URL will break unless you redirect them. If you do change one:
- Set up a permanent redirect from the old URL to the new one. Google recommends a permanent server-side redirect, such as a 301 or 308, when you change a page's URL.
- Redirect directly to the final URL rather than through a chain of redirects. Google advises keeping chains short.
- Update your internal links and sitemap so they point to the new address.
Our guidance: don't change slugs just to add keywords. Given how little effect URL keywords have on rankings, the risk of broken links usually outweighs any benefit.
Common mistakes
- Leaving the default: slugs such as "untitled", "copy-of-page" or an auto-generated number.
- Copying the whole title: long slugs full of filler words.
- Mixing styles: some pages with underscores, some with hyphens, some with capital letters.
- Stuffing keywords: repeating the same words in the slug, which does not help and looks spammy.
- Changing slugs without redirects: breaking links from other sites, social posts and your own pages.
Frequently asked questions
Do keywords in URL slugs help SEO?
Very little on their own. Google's SEO Starter Guide says keywords in the URL path alone have hardly any ranking effect beyond appearing in breadcrumbs. A descriptive slug still helps people understand the page before they click.
Should I use hyphens or underscores?
Hyphens. Google recommends hyphens to separate words in URLs and does not recommend underscores.
Should I remove stop words such as "a" and "the"?
Often, yes, if the slug still reads clearly without them. It is a readability choice rather than a Google rule.
Is there a maximum slug length?
Google's documentation does not set an ideal slug length. Keep slugs short and descriptive, and avoid unnecessary parameters.
Next steps
Use the case converter to format your next slug, and check your page title and headings with our guide to title case vs sentence case. For more on writing for search without overdoing keywords, see what a good keyword density is.

