Rankite
ServicesResultsToolsTeamAboutBlogCareersContactFree SEO Audit
On-Page SEO

What Is an SEO Slug? Definition, Examples and Best Practices

Home / Blog / What Is an SEO Slug? Definition, Examples and Best Practices
What is an SEO slug, illustrated with a browser address bar and a clean URL path

An SEO slug is the readable part of a web address that identifies a single page, the segment that comes after the domain name and any folders. In the URL rankite.com/blog/what-is-an-seo-slug, the slug is "what-is-an-seo-slug". A good slug is short, lowercase, uses hyphens between words, and describes what the page is about so both people and search engines can tell at a glance what they will find.

Key takeaways

  • A slug is the final, human-readable piece of a URL that names one specific page.
  • Your content system usually creates the slug automatically from the page title, but you can and often should edit it before publishing.
  • Best practice is short, lowercase, hyphenated, keyword-relevant, and free of dates, IDs, and stop words.
  • Google's own URL guidance recommends hyphens over underscores and readable words over long ID numbers.
  • Slugs are a very lightweight ranking factor, but a clean one improves click-through and helps AI engines read your page.
  • Never change a live slug without a 301 redirect, or you break links and lose rankings until Google recrawls.

What is a slug in a URL?

A slug is the last part of a URL: the readable text that points to one particular page, sitting after the domain and any folder path. It is the bit you usually have full control over when you publish a page. Strip away the protocol, the domain, and the folders, and what remains is the slug.

Look at a full address broken into pieces:

Part of the URLExampleWhat it is
Protocolhttps://How the browser connects
Domainrankite.comYour website
Folder (path)/blog/The section the page lives in
Slugwhat-is-an-seo-slugThe unique name of this page

The word itself comes from journalism, where a "slug" was a short internal label for a story. Web publishers borrowed the term for the short label that names a page in its address. That history is a useful reminder of what a slug is for: a quick, plain-language tag, not a place to cram keywords.

These three words get mixed up constantly, and the confusion leads people to "optimize" the wrong thing. Here is the clean distinction.

The URL is the entire web address, the permalink is the permanent full URL for a specific page, and the slug is only the final naming segment inside that address. Think of it as a set of nesting boxes: the URL is the whole address, the permalink is that address treated as a fixed, shareable link, and the slug is the one piece you typically write yourself.

TermWhat it coversExample
URLThe complete address, end to endhttps://rankite.com/blog/what-is-an-seo-slug
PermalinkThe permanent URL meant to stay fixed over timehttps://rankite.com/blog/what-is-an-seo-slug
SlugJust the page's naming segmentwhat-is-an-seo-slug

So when someone says "optimize your slug," they mean improve that last segment, not rebuild the whole address. The folder structure and domain are separate decisions.

Where does a slug come from?

Most of the time, you do not type a slug from scratch. Your content management system generates one automatically the moment you add a title.

When you publish a page, your CMS turns the title into a slug by lowercasing it, replacing spaces with hyphens, and stripping out punctuation. A title like "What Is an SEO Slug?" becomes "what-is-an-seo-slug" by default. Some platforms instead default to an ID string such as "p=2413", which is exactly the kind of opaque slug you want to replace.

The key point: the auto-generated slug is a starting draft, not a final decision. It is almost always too long, because it copies your whole headline word for word. Editing it down before you hit publish takes a few seconds and is one of the easiest on-page wins there is. Once a page is live and indexed, changing the slug gets risky, which we cover below.

What are the best practices for an SEO slug?

A strong slug follows a short, consistent set of rules. None of them are complicated, and most take seconds to apply.

Anatomy of a clean slugShort and focusedThree to five words, around 17 charactersfor top pages (Backlinko)Lowercase, hyphenatedHyphens between words, neverunderscores or capitals (Google)Describes the pageInclude the main keyword once,drop stop wordsStable over timeNo dates, no ID numbers,no special characters
Source: Rankite, drawing on Google and Backlinko guidance

Here is the working checklist:

  • Keep it short. Aim for three to five words. Backlinko's analysis of search results found the slugs of top-ranking pages average around 17 characters, so brevity tends to travel with strong rankings.
  • Use lowercase. URLs are case-sensitive after the domain, so /Apple and /apple can be treated as two different pages. Google advises keeping everything in one case to avoid that.
  • Separate words with hyphens, not underscores. Google's URL structure documentation recommends hyphens because search engines read them as spaces between words.
  • Include your target keyword once. A keyword in the slug describes the page and shows in the search snippet. Use it once, naturally, then stop.
  • Remove stop words. Words like "the", "a", "and", and "of" rarely add meaning. Trim them so only the load-bearing words remain.
  • Avoid dates and ID numbers. A slug like /2024-seo-tips dates your content, and /p=2413 tells nobody anything. Google specifically recommends readable words over long ID numbers.
  • Skip special characters. Symbols, spaces, accents, and emojis get percent-encoded into ugly strings and can break links. Stick to plain ASCII letters and hyphens.

If you want the wider context for how on-page choices like this fit a full strategy, our guide to what SEO is sets the foundation.

Good vs bad slug examples

Rules are easier to absorb against examples. The pattern below shows the same pages written badly and then fixed.

Avoid/post.php?id=2413/Best_SEO_Tips_For_2024/the-ultimate-guide-to-seo-slugs/page1Use/seo-slug-guide/best-seo-tips/seo-slug-best-practices/pricing
Source: Rankite
Bad slugWhy it failsBetter slug
/post.php?id=2413Opaque ID, tells readers and crawlers nothing/seo-slug-guide
/Best_SEO_Tips_For_2024Capitals, underscores, and a date that goes stale/best-seo-tips
/the-ultimate-guide-to-seo-slugsToo long, padded with stop words/seo-slug-best-practices
/page1Generic, describes nothing/pricing

The fixed versions all do the same thing: say what the page is, in as few plain words as possible.

How do you set a slug in WordPress or Shopify?

Editing a slug is a two-minute job in any modern platform. The exact label differs, but the idea is the same: find the field that shows the auto-generated URL and shorten it before publishing.

In WordPress, the slug lives in the "Permalink" or "URL slug" field in the post settings sidebar; in Shopify it sits under "Search engine listing" on the product, page, or blog post editor. Both let you overwrite the draft slug the system created from your title.

In WordPress, open the post, click into the Permalink field near the top of the editor (or in the right-hand sidebar under "Post" then "URL"), edit the slug text, and update. If you use an SEO plugin like Yoast or Rank Math, it surfaces the same field in its snippet preview. The same flow applies when you set up a post for the first time, which we walk through in our guide on how to publish on WordPress.

In Shopify, scroll to the bottom of the product, collection, page, or blog post editor to the "Search engine listing" section, click "Edit", and change the "URL handle". Shopify calls a slug a "handle", but it is the same thing. Shopify also auto-creates a redirect when you change a handle, which is a helpful safety net most platforms do not give you.

Should you change an existing slug?

This is where slugs turn from harmless to hazardous. Editing the slug of a page nobody has visited yet is free. Editing the slug of a live, indexed page is a different matter.

Only change a live slug when you have a real reason, and always set up a 301 redirect from the old slug to the new one. A 301 is a permanent redirect that sends both visitors and search engines from the old address to the new one, passing along most of the page's ranking signals.

Skip the redirect and three things break at once. Existing inbound links and bookmarks now point at a dead address and return a 404. Any ranking the old URL earned can vanish until Google recrawls and reassigns it. And anyone who shared the old link sends their audience to nothing. The redirect is what prevents all of that.

So the honest answer for most pages is: leave the slug alone. Fix it before you publish, and only revisit a live slug when the current one is genuinely confusing, embarrassing, or wrong, with the 301 in place before you save. If you are auditing a site for issues like this, our SEO audit checklist covers where broken URLs and missing redirects tend to hide.

Common slug mistakes to avoid

Most slug problems come down to a handful of repeat offenders.

  • Leaving the auto-generated slug untouched. The default copies your entire title, stop words and all, so it is almost always too long.
  • Stuffing keywords. Repeating your keyword two or three times in the slug looks manipulative and adds no value. Once is plenty.
  • Baking in dates or years. A /2025-guide slug forces you to either let the URL look outdated or migrate it later.
  • Using underscores or capitals. Both go against Google's guidance and can cause duplicate or unreadable URLs.
  • Changing slugs casually. Renaming live URLs without 301 redirects is one of the fastest ways to lose hard-won rankings.
  • Making slugs match the title word for word. The title can be a full sentence; the slug should be the two or three words that matter.

Slugs sit alongside titles, meta descriptions, and headings as part of the on-page layer. If you are tightening all of those at once, our piece on what content optimization is shows how they work together.

Frequently asked questions

What is an SEO slug in simple terms? It is the readable part of a web address that names a specific page, the bit that comes after the domain and any folders. In rankite.com/blog/what-is-an-seo-slug, the slug is what-is-an-seo-slug. A good slug is short, lowercase, and describes the page.

Is the slug the same as the URL? No. The URL is the full web address, including the protocol, domain, and folders. The slug is only the final segment that identifies the individual page. The slug is one part of the URL, not the whole thing.

Does a slug affect SEO rankings? Only lightly. Google's John Mueller has said words in a URL are a very lightweight ranking factor. The bigger benefit is clarity: a clean slug shows in the search snippet, helps people decide to click, and gives both readers and AI engines a quick read on the page topic.

Should I put my keyword in the slug? Yes, when it fits naturally. Include your main keyword once so the slug describes the page, then stop. Repeating the keyword or stuffing extra terms looks spammy and does not help. Match the slug to the page topic, not to a keyword list.

Hyphens or underscores in a slug? Use hyphens. Google's URL structure documentation recommends hyphens to separate words because search engines read them as gaps between words. Underscores join words together, so seo_url_tips can be read as one term while seo-url-tips reads as three.

How long should a slug be? Keep it short, usually three to five words. Backlinko's analysis found that the slugs of top-ranking pages average around 17 characters. Trim stop words like the, and, and of so only the meaningful words remain.

Where does a slug come from? Most content systems create it automatically from the page title when you publish. WordPress, Shopify, and similar platforms turn the title into a lowercase, hyphenated string. You can edit that draft slug before publishing to make it shorter and cleaner.

Should I change an existing slug? Only when there is a clear reason, and always add a 301 redirect from the old slug to the new one. Changing a slug without a redirect breaks existing links and bookmarks and can drop the page from search results until Google recrawls.

What to do next

Open the page you are about to publish, look at the slug your CMS drafted, and trim it to three to five plain words that name the page. For pages already live, leave the slugs alone unless one is genuinely broken, and add a 301 redirect if you do change it. Small habit, real payoff. If you want a second set of eyes on your URLs and the rest of your on-page setup, request a free SEO audit from Rankite and we will show you what to fix first.

Related articles

Let's grow

Ready to own page one?

Get a free, no-obligation SEO audit and a 30-minute strategy session. We'll show you exactly where the growth is hiding.

Book your free audit Explore services
Get in touch

Tell us about your project

Fill out the form and we'll get back to you within one business day. Prefer email? Write to us directly at contact@rankite.com.

Or copy our email and write to us directly: contact@rankite.com