
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.
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 URL | Example | What it is |
|---|---|---|
| Protocol | https:// | How the browser connects |
| Domain | rankite.com | Your website |
| Folder (path) | /blog/ | The section the page lives in |
| Slug | what-is-an-seo-slug | The 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.
| Term | What it covers | Example |
|---|---|---|
| URL | The complete address, end to end | https://rankite.com/blog/what-is-an-seo-slug |
| Permalink | The permanent URL meant to stay fixed over time | https://rankite.com/blog/what-is-an-seo-slug |
| Slug | Just the page's naming segment | what-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.
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.
A strong slug follows a short, consistent set of rules. None of them are complicated, and most take seconds to apply.
Here is the working checklist:
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.
Rules are easier to absorb against examples. The pattern below shows the same pages written badly and then fixed.
| Bad slug | Why it fails | Better slug |
|---|---|---|
| /post.php?id=2413 | Opaque ID, tells readers and crawlers nothing | /seo-slug-guide |
| /Best_SEO_Tips_For_2024 | Capitals, underscores, and a date that goes stale | /best-seo-tips |
| /the-ultimate-guide-to-seo-slugs | Too long, padded with stop words | /seo-slug-best-practices |
| /page1 | Generic, describes nothing | /pricing |
The fixed versions all do the same thing: say what the page is, in as few plain words as possible.
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.
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.
Most slug problems come down to a handful of repeat offenders.
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.
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.
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.
Get a free, no-obligation SEO audit and a 30-minute strategy session. We'll show you exactly where the growth is hiding.
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.