What Is a URL Slug? How to Write SEO-Friendly URLs

If you have ever wondered what is a URL slug, compare these two addresses for the same article:

  • example.com/index.php?id=4827&cat=12
  • example.com/blog/how-to-compress-a-pdf

The second tells you exactly what the page is about before you click. That descriptive final part is the slug. This guide explains why it matters and how to write a good one. Here is a practical guide for bloggers, shop owners and developers.

Screenshot of the Slug Generator on Assen Tools
The Slug Generator in use. Open the Slug Generator – free, no sign-up.

The definition

A slug is the part of a URL that identifies a specific page in human-readable words. In https://example.com/blog/what-is-a-sitemap, the slug is what-is-a-sitemap. WordPress calls the full address a permalink, and lets you edit the slug for every post and page.

Why good slugs matter

  • Readability: people are more likely to click a link they understand, especially when it is shared in WhatsApp or email.
  • SEO: a relevant word or two in the URL is a small but useful signal, and Google sometimes shows the URL path in results.
  • Trust: clean, readable URLs look professional; long strings of numbers and symbols look spammy.
  • Memorability: short slugs are easier to type and remember.

Rules for SEO-friendly URLs

  1. Use lower case. Some servers treat /Blog and /blog as different pages.
  2. Separate words with hyphens. Google recommends hyphens rather than underscores or spaces.
  3. Keep it short and descriptive – usually three to six words.
  4. Include the main keyword naturally.
  5. Remove special characters such as ?, &, %, # and accented letters.
  6. Drop filler words where the meaning stays clear ("the", "and", "of").
  7. Avoid dates and numbers that will age, such as /best-phones-2024, unless the content truly is time-specific.

Examples

  • Title: "10 Easy Ways to Make Your Website Load Faster in 2026" Poor slug: /10-easy-ways-to-make-your-website-load-faster-in-2026 Better slug: /make-website-load-faster

  • Title: "Café Menu Prices & Opening Hours" Poor slug: /caf%C3%A9-menu-prices-&-opening-hours Better slug: /cafe-menu-prices

Changing slugs on existing pages

Be careful. If a page already has traffic or links, changing its slug creates a new URL. Always add a 301 redirect from the old address to the new one – see what is a 301 redirect – and update internal links and your sitemap.

Generate clean slugs instantly

The free Slug Generator turns any title into a clean slug: lower case, hyphens, accents converted and special characters removed. It is handy for blog posts, product pages and developers creating URLs in code.

While you are polishing the page:

Frequently asked questions

Should the slug match the title exactly? No. It should reflect the topic and keyword, but it can be shorter than the title.

Do slugs need to include the category? Not necessarily. Shorter URLs without deep folders are easier to manage and share.

Are uppercase letters bad? They are not penalised, but lower case avoids duplicate-URL problems and looks cleaner.

Can slugs use other languages? Yes, but non-Latin characters are encoded in links and can look messy when shared. Many sites use transliterated Latin letters.

Summary

So, what is a URL slug? The readable part of an address that identifies a page. Keep it lower case, hyphenated, short and descriptive with your main keyword, and redirect old slugs when you change them. Create clean slugs in one click with the free Slug Generator.

Jonathan Nwachukwu, founder of Assen Tools

Written by

Jonathan Nwachukwu · Founder & developer

Jonathan is a freelance web developer and web development teacher who builds Laravel, WordPress and WooCommerce sites for clients. He built AssenTools to put the everyday file, photo and calculation jobs he kept doing for clients and students into one free, private toolbox, and he maintains every tool and guide on the site.