Skip to content

Guides

What is a URL slug and how to write one correctly

The slug is a small part of a web address that is often overlooked, yet visitors see it in the address bar and in search results. A clean slug makes a link easy to read, remember and share.

By Tipamedia · 4 min read · updated

What is a slug?

In the address https://tipamedia.com/tools/slug-generator, the part “slug-generator” is the slug. It shows which page to open, after the domain name and folder.

A slug is usually made from the page title. Because titles often contain spaces, capital letters and punctuation that are not allowed in a URL, the title first has to be cleaned up into a slug.

Why do slugs matter?

The reasons slugs matter come down to three things:

  • Readable by people: visitors can guess what a page is about before opening it.
  • Easy to share: a short, meaningful link is more comfortable to paste into a message or social media.
  • Read by search engines: the words in a slug give extra hints about the page topic, and the slug also shows up in search results.

Rules for a good slug

Stick to these habits so slugs stay consistent across your whole site:

  • Use all lowercase letters, because some servers treat uppercase and lowercase as different.
  • Separate words with hyphens (-), not underscores or spaces.
  • Remove special characters and punctuation such as question marks, exclamation marks and parentheses.
  • Keep it short and focused on the main keyword. Filler words such as “the”, “of” and “for” can be dropped if they make the slug too long.
  • Avoid dates or years unless they are truly part of the topic, so the slug does not look outdated.

Example: from title to slug

Title: “How to Build an Online Store Website for Beginners (2026 Edition)!”

Slug: how-to-build-an-online-store-website-for-beginners

For titles with accented letters or symbols, Slug Generator cleans them up automatically following the rules above.

Don’t change a slug carelessly

Once a page is published and shared, its address becomes that page’s identity. Changing the slug breaks old links and throws away the signals the page has already gathered. If you must change it, set up a permanent redirect (301 redirect) from the old address to the new one.

The slug is only one part of page SEO

A slug works together with the page title and description. Also read the guide to writing a meta title and description, then preview the result with SERP Preview.

Frequently asked questions

Does the slug affect Google rankings?

Only slightly. A slug gives a light hint about the page topic, but content quality matters far more. The main reason to tidy up a slug is readability and making links easier to share.

Hyphens or underscores in a slug?

Use hyphens. Google recommends hyphens for separating words in a URL, because underscores can be read as joining the words together.

How long should a slug be?

There is no fixed number. Keep it short, around three to six words that contain the main topic, as long as it stays clear to read.

Need hands-on help?

We build websites, apps, and custom systems for your business.

This guide was written by the Tipamedia team based on our day-to-day work. Tell us what you need and we will help you work out the next step.

Or email us at [email protected].