A URL slug is the last, human-readable part of a web address—the words that tell visitors and search engines what a page covers. In https://example.com/blog/what-is-a-url-slug, the slug is what-is-a-url-slug. While slugs appear small, effective URL slug SEO matters because slugs show up in search results, shared links, and analytics reports, and they are difficult to change once a page is live. This guide explains what a URL slug is and details seven practical rules, aligned with Google Search Central advice on URL structure, for creating clean slugs that stay useful for years.

A URL is the full address: protocol, domain, path and sometimes a query string. The slug is the segment that names one specific page. A permalink is the permanent URL a CMS such as WordPress assigns to a post, usually built from a folder path plus the slug. When you edit the "slug" field in your CMS, you are changing the end of the permalink.

PartExample
Full URLhttps://example.com/blog/url-slug-seo?ref=newsletter
Path/blog/url-slug-seo
Slugurl-slug-seo
Query string?ref=newsletter
Anatomy of a URL
https://Protocolexample.comDomain/blog/Pathurl-slug-seoSlug?ref=newsletterQuery string

1. Use simple, descriptive words

Google recommends a simple URL structure that uses readable words rather than unreadable ID numbers. A visitor should be able to guess what a page covers from its slug alone. For example, /guides/sourdough-starter is instantly clear, while /p/18342 tells the user nothing. Pick the two to five words that accurately describe the page content and match how people search for the topic.

2. Separate words with hyphens

Use hyphens (-) to separate words. Google's guidance specifically recommends hyphens rather than underscores because search engines often treat underscores as joining characters, meaning url_slug_seo may be indexed as a single token. Spaces cause even more problems: browsers encode them as %20, which looks cluttered and broken when pasted into messages or social posts.

3. Keep everything lowercase

Most web servers treat URL paths as case-sensitive, meaning /Blog/URL-Slug and /blog/url-slug can be served as two separate pages with duplicate content. Keeping every slug entirely lowercase removes this duplicate content risk, prevents typos, and ensures a clean appearance in search results. If your site already has mixed-case URLs published, set up 301 redirects to a single canonical lowercase version.

4. Remove accents, symbols and emoji

Characters outside standard ASCII get percent-encoded across browsers and chat apps, so café often turns into caf%C3%A9 when shared. Transliterate them into plain characters instead: é becomes e, ß becomes ss, and Привет becomes privet. Convert meaningful symbols into words (& becomes "and", % becomes "percent"), and strip emoji and punctuation entirely. For international sites targeting specific regions, keeping native characters can work if your platform handles UTF-8 consistently, but transliteration ensures universal compatibility.

5. Keep it short and drop filler words

Short slugs are easier to read, copy, and remember, and they avoid getting truncated in search engine result pages. Strip unnecessary stop words such as "a", "the", and "for" whenever the core meaning remains intact: /the-ultimate-guide-to-the-best-coffee-in-new-york becomes /best-coffee-new-york. Omit publication dates and years unless the content is tied to a specific annual event, so you avoid having to change the URL when updating the page later. As a practical target for URL slug SEO, aim for 60 characters or fewer.

6. Avoid unnecessary parameters and IDs

Query strings such as ?id=123&sort=asc&session=abc produce multiple URLs for the same underlying content and make search engine crawling less efficient. Use a clean, descriptive slug for the canonical version of each page, reserving query parameters for dynamic filtering, sorting, or campaign tracking. When tagging outbound marketing links, generate structured parameters using a UTM builder so campaign data remains consistent.

7. Use 301 redirects when you change a slug

Changing a published slug alters the page address entirely. Without a redirect, the old address returns a 404 error, breaking inbound links, user bookmarks, and search equity. Add a permanent 301 redirect from every old URL to its new destination, update your XML sitemap, and adjust internal links across your site. Avoid redirect chains by pointing every legacy URL straight to the final destination. For site migrations with hundreds of URLs, automate the redirect mapping from a spreadsheet rather than hand-coding server directives. The 301 redirect generator turns old → new pairs into Apache, Nginx, or Cloudflare rules and flattens chains for you.

Good vs bad slug examples

BadBetter
/index.php?id=4821&cat=7/sourdough-starter-guide
/Blog/My_First_Post/blog/my-first-post
/10-things-you-need-to-know-about-the-best-running-shoes-for-2026/best-running-shoes
/caf%C3%A9-cr%C3%A8me-br%C3%BBl%C3%A9e/cafe-creme-brulee
/salt-&-pepper-shrimp!!/salt-and-pepper-shrimp

Tools that help

You can turn a list of titles into search-friendly slugs with our URL slug generator. If you are updating URLs across an entire site, our bulk CSV slug generator processes your spreadsheet in the browser and outputs server-ready 301 redirect rules. For application developers building routing logic from scratch, copy tested implementations directly from our slugify regex and code snippets reference.

Tip

Key takeaways

  • A URL slug is the human-readable path segment that identifies a specific page.
  • Use descriptive, lowercase words separated by hyphens rather than underscores or spaces.
  • Transliterate accented characters, replace symbols like & and % with words, and remove emoji.
  • Keep slugs concise by removing unnecessary stop words, dates, and database IDs.
  • Use clean hierarchical paths instead of query parameters for your primary content pages.
  • Always implement permanent 301 redirects whenever you change a published slug.

FAQ

Frequently asked questions

Is a slug the same as a permalink?

No. The permalink is the full permanent URL of a post; the slug is the last part of it that names the page.

How long should a URL slug be?

Aim for 60 characters or fewer, usually two to five descriptive words.

Should I put the year in a slug?

Only if the page is about a specific annual event. Otherwise you will have to change the URL when you update the page.

What happens if I change a published slug?

The old URL returns a 404 unless you add a 301 redirect to the new one.