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

The slug is the last part of a URL that identifies a specific page – in example.com/blog/how-to-make-a-qr-code/, the slug is how-to-make-a-qr-code. It is small, but it appears in search results, in shared links and in browser tabs. A clean slug helps people and search engines understand the page before they open it.

Free tool
Generate URL slugs
Turn titles into clean, lowercase slugs – remove accents and stop words, choose hyphens or underscores and set a maximum length. Works for many titles at once. Free.
Open Slug Generator →

What makes a good slug?

  • Short: 3–5 words is usually enough.
  • Descriptive: includes the main keyword.
  • Lowercase: avoids duplicate URLs that differ only by case.
  • Hyphens between words: Google recommends hyphens rather than underscores.
  • Only letters, numbers and hyphens: no spaces, accents, emoji or special characters.
  • No dates or numbers that will change: “best-tools-2026” goes out of date; “best-tools” does not.

Examples

Page titleWeak slugBetter slug
How to Make a QR Code for Free in 2026/p=123/how-to-make-a-qr-code/
10 Best Budget Apps for Students/10-best-budget-apps-for-students-2026-updated//budget-apps-for-students/
Café Menu & Prices/Café_Menu&Prices/cafe-menu-prices/

Should you remove stop words?

Stop words are small words such as “a”, “the”, “and”, “of”. Removing them makes slugs shorter – how-make-qr-code – but sometimes less readable. Keep them when they make the slug clearer; remove them when the slug gets long. Our Slug Generator lets you choose.

Hyphens or underscores?

Use hyphens. Google treats hyphens as word separators, while words joined by underscores may be read as one word. Underscores are fine for file names in code, not for page URLs.

Changing a slug on a live page

Changing a published URL can lose rankings and break links. If you must:

  • Set up a 301 redirect from the old URL to the new one (WordPress SEO plugins and many hosts can do this).
  • Update internal links.
  • Update your sitemap.
  • Do not change slugs just for small keyword tweaks.

Slugs in WordPress

Go to Settings › Permalinks and choose “Post name” for clean URLs. Then edit each post’s slug in the editor’s URL or Permalink field before publishing.

FAQ

What is a slug in a URL?

The part of the URL that identifies a specific page, usually after the last slash.

How long should a URL slug be?

Short – usually 3–5 words, ideally under about 60 characters.

Do URL slugs affect SEO?

Slightly. A clear slug helps users and search engines understand the page, but content quality matters far more.

Should slugs include keywords?

Yes, the main keyword where it fits naturally.

Can I use non-English characters in slugs?

You can, but they are encoded in links and can look messy. Transliterating to plain letters is usually cleaner.

Free tool
Try the free Slug Generator
No signup and nothing uploaded – it runs right in your browser. Browse all 74 free tools on our Free Tools page.
Open Slug Generator →

Need a website or app for your business? Talk to Techpass Master – we design and build websites and apps for clients worldwide.

WhatsApp us📞 Call now