What Is Slug?

Flavio AmielWritten byFlavio Amiel Founder, Roborank
Updated July 15, 2026

A slug is the human-readable portion of a URL that identifies a specific page, typically the final segment of the path after the last slash. In the address example.com/blog/my-first-post, the slug is my-first-post. Slugs are usually lowercase words joined by hyphens, describing the page’s content in a form both people and search engines can read.

Key Takeaways

How a Slug Works

Break a URL into pieces and the slug is the last meaningful one. In https://example.com/blog/my-first-post, the scheme is https://, the domain is example.com, /blog/ is a folder, and my-first-post is the slug — the part that identifies this specific page rather than the section it lives in. The word borrows from newspaper production, where a slug was the short internal name editors used to refer to a story while it moved through the presses. On the web it plays the same role: a compact, human-friendly handle for one page.

A slug is worth caring about because it is the part of the URL you actually choose, and Google is explicit about what a good choice looks like. The URL structure guidance recommends “readable words rather than long ID numbers,” and it recommends hyphens over underscores so that separate concepts read as separate words. A slug is exactly where those rules apply. /aviation and /summer-clothing are slugs that obey them; /index.php?topic=42 and /summer_clothing are the counterexamples Google warns against.

Most content management systems generate a slug automatically from the page title. WordPress, for instance, turns a post titled “My Awesome Article” into the slug my-awesome-article and exposes it as an editable field. As WordPress’s own documentation describes, the slug is the customizable end of the permalink — the full, permanent URL — and it is meant to give a “user-friendly description” of the page. That auto-generation is a convenience, not a mandate: a title-derived slug is often longer than it needs to be, and trimming it before publishing is one of the cheapest wins in on-page SEO.

Example of a Slug

Google’s URL structure documentation provides the reference case, because it shows the slug decision as a direct before-and-after. Google’s recommended, readable URL is:

https://example.com/wiki/Aviation

Here wiki is the folder and Aviation is the slug — a single, legible word naming the page’s subject. Google contrasts this with the form to avoid:

https://example.com/index.php?topic=42&area=3a5ebc944f41daa6f849f730f1

The second address has no slug at all. The page is identified by numeric and hexadecimal IDs passed as URL parameters, which carry zero meaning to a human and no topical signal to a crawler. Both URLs can resolve to the identical article; the only difference is whether the page announces itself in words or hides behind machine identifiers.

The WordPress workflow shows the same principle in the tool most publishers actually use. Give a post the title “10 Best Tips For Writing Great Blog Posts,” and WordPress will propose the slug 10-best-tips-for-writing-great-blog-posts. It is technically valid — lowercase, hyphenated, readable — but longer than the page needs. Editing it down to blog-writing-tips keeps everything Google asked for, shortens every link to the page, and reads more cleanly in a search result. That is the whole craft of a slug: take the readable-words-and-hyphens rule Google states, and spend a moment making the result as short and honest as it can be before the URL becomes permanent.

The thing people get wrong

The temptation with slugs is to cram the whole target keyword phrase in and call it optimized, but the property that actually matters is that you set it once and never change it. A slug is a permanent identifier baked into every link and share of that page. When people rename a slug to chase a keyword, they either break the old URL or bolt on a redirect that leaks a little equity every hop. Write a short, honest, hyphenated slug at publish time — two or three words that name the page — and then leave it alone. Auto-generated slugs from a long title are the usual mess: /10-best-tips-for-writing-great-blog-posts-in-2026 should just be /blog-writing-tips. Trim it before you hit publish, because after publish, every edit has a cost.

Frequently Asked Questions

What is a slug in a URL?
A slug is the readable part of a URL that identifies a specific page, usually the last segment of the path. In example.com/blog/my-first-post, the slug is my-first-post. It is meant to describe the page’s content in words a person and a search engine can both read.
How should I format a slug?
Use short, lowercase words that describe the page, separated by hyphens rather than underscores. Google recommends readable words over ID numbers and uses hyphens to distinguish concepts, so /blog-writing-tips is cleaner and clearer than /blog_writing_tips or a numeric ID.
Should I change a slug after publishing?
Avoid it when you can. A slug is part of the page’s permanent URL, so changing it breaks existing links unless you add a redirect, and every redirect costs a little authority. Set a clean slug before publishing rather than renaming it later to chase keywords.
Is the slug the same as the URL?
No. The slug is only one piece of the URL — usually the final path segment. The full URL also includes the scheme, domain, and any folders. The slug is the customizable, page-identifying tail, while the rest of the address places the page within the site.

The Bottom Line

A slug is the readable tail of a URL that names a single page, normally the last path segment, spelled as short lowercase words joined by hyphens. It exists to make an address legible to people and search engines instead of leaving it as an opaque ID. Write it clearly and briefly at publish time, keep it hyphenated, and treat it as permanent — because everything that links to the page depends on it not moving.

Sources

  1. Keep a simple URL structureGoogle Search Central
  2. Edit a page or post link (permalinks and slugs)WordPress.com

Rank & Cash — the weekly SEO breakdown

One practical teardown a week on ranking in search and getting cited by AI. No fluff.