What Is a URL Slug? How to Write a Good One (With Examples)

Close-up of a silver laptop keyboard, the kind of setup used to write and publish web pages
Photo: “Laptop Keyboard” by Lenharth Systems · CC0 1.0 · via Openverse (stocksnap)

Short answer

A URL slug is the last, human-readable part of a web address that names one specific page. In example.com/blog/how-to-make-a-budget, the slug is how-to-make-a-budget. A good slug is short, lowercase, uses hyphens between words and describes the page in plain words. Paste any title into our free Slug Generator to turn it into a clean slug in one step.

Every page on a website has an address, and most of that address is fixed: the domain, then maybe a folder such as /blog/ or /shop/. The bit at the end is the part you actually choose. It is called the slug, a word borrowed from old newspaper offices, where editors gave each story a short working name while it moved through the building. On the web, the slug does the same job. It tells people, and search engines, what this one page is about before they even click.

Where the slug sits in a URL

Take the address https://www.example.com/recipes/easy-banana-bread?ref=newsletter and split it up:

PartExampleWhat it does
Protocolhttps://How the browser connects (secure HTTP)
Domainwww.example.comWhich website
Folder (path)/recipes/Which section of the site
Slugeasy-banana-breadWhich page in that section
Query string?ref=newsletterExtra data, often for tracking or filters

The query string after the question mark is not part of the slug. Tracking tags such as utm_source belong there, and our UTM Builder adds them for you without touching the slug itself.

What makes a good slug

Good and bad slug examples

Page titleWeak slugBetter slug
How to Make a Budget in 5 Easy Stepspost-18734how-to-make-a-budget
The 10 Best Free Photo Editors for Students in 2026The_10_Best_Free_Photo_Editorsfree-photo-editors-for-students
Café & Bistro: Joe's Top 10 Tips!café-&-bistro-joe's-top-10-tips!cafe-and-bistro-joes-top-10-tips
Crème Brûlée Recipecrèmebrûléerecipecreme-brulee-recipe

Notice the year was dropped from the photo editor slug. If you update that list every year, a slug without a date can stay the same forever, while the title and content change. Only keep a date in the slug when the page is truly about one moment, such as an event or a news story.

How to write a slug in four steps

  1. Start from the title or main keyword. What would someone type into a search box to find this page? That phrase is usually your best slug.
  2. Cut filler words when they add nothing. Small words like the, a, for and in can often go. Keep them if removing them changes the meaning or makes the slug hard to read: how-to-make-a-budget reads better than how-make-budget.
  3. Clean the characters. Lowercase everything, swap accented letters for plain ones, replace & with and, drop apostrophes and punctuation, and put a single hyphen between words.
  4. Check it once, then leave it alone. Read it out loud. If a stranger would guess what the page is about, you are done.

The Slug Generator handles step three automatically and can do the first two for you as well: tick Remove common stop words to drop filler words, and set a Max length to trim long titles at a word boundary instead of chopping a word in half. You can paste many titles at once, one per line, which is handy when you are planning a batch of blog posts. If your titles themselves need tidying first, our guide to title case rules and the walkthrough on changing uppercase to lowercase will help.

Does the slug help SEO?

A little, but not in a magic way. The slug is one of the first things a person sees in a search result or a shared link, so a clear one can make them more willing to click. It also gives search engines a small, consistent hint about the topic. What it will not do is rescue a weak page. The content, the page title and the meta description carry far more weight, and stuffing extra keywords into the slug (best-cheap-budget-app-budget-planner-budget-free) just looks spammy.

VSH take: we treat slugs like file names on a shared drive. If a teammate could find the page from the address alone a year from now, the slug is good enough. Most people overthink the SEO part and underthink the "will this still make sense later" part.

Changing a slug after a page is live

Changing a published slug creates a brand new address. Anyone who bookmarked the old one, and every link pointing to it from other sites, will hit a "page not found" error unless you tell browsers where the page went. The fix is a permanent (301) redirect from the old URL to the new one. Google's documentation describes a permanent server-side redirect as the most reliable way to tell it that a page has moved for good.

Even with a redirect, only change slugs for a real reason, such as a typo, a misleading word or a big topic change. Changing slugs just to chase a new keyword usually costs more than it gains. If you write long guides, it is worth deciding the slug at the planning stage, along with roughly how long the page will be.

Quick checklist

This guide is general information for website owners and bloggers. ViralScopeHub is an independent site and is not affiliated with Google, the IETF or any content management system mentioned here.

Frequently asked questions

What is a slug in a URL?

It is the readable part at the end of a web address that identifies one page, such as how-to-make-a-budget in example.com/blog/how-to-make-a-budget.

Should I use hyphens or underscores in a URL slug?

Use hyphens. Google recommends hyphens because they clearly separate words, while underscores are often read as joining words into a single term.

How long should a URL slug be?

There is no official limit, but three to six meaningful words is a good target. Keep it short enough to read at a glance and share easily.

Should a slug include stop words like the, a or and?

Drop them when they add nothing, but keep them if removing them makes the slug confusing or changes the meaning.

Can I change a URL slug after publishing?

Yes, but set up a permanent 301 redirect from the old address to the new one so bookmarks and links keep working, and only change it for a good reason.

Are URL slugs case sensitive?

Yes, the path part of a URL is case sensitive, so stick to lowercase to avoid duplicate pages and broken links.

Sources

More games

All games