Key takeaways
- A slug is the part of a URL after the domain and folders that names a specific page in readable words.
- Google's SEO Starter Guide says keywords in a URL path alone have hardly any ranking effect beyond appearing in breadcrumbs.
- Google recommends hyphens instead of underscores in URLs and treats uppercase and lowercase URLs as different addresses.
- When a live page's slug changes, Google recommends a permanent 301 or 308 redirect kept for at least a year.
An SEO slug is the last part of a page’s URL, the readable words after the domain and any folders that tell people and search engines what the page is about, so in example.com/blog/how-to-clean-a-coffee-maker the slug is how-to-clean-a-coffee-maker. A well optimized slug is short, written in lowercase, uses hyphens between words and describes the page in the words your readers would use. Google says keywords in a URL have hardly any ranking effect on their own, so the real job of a slug is to be clear to the person deciding whether to click, and once a page is live and ranking you should change its slug only with a 301 redirect from the old address.
What a slug is, with examples
Every URL is made of parts, and the slug is the only one most site owners write by hand for each page. On WordPress it is the “slug” field under the post title, on Shopify it is the URL handle, and on most other platforms it is generated from the title until you edit it.
| Part of the URL | Example | Who controls it |
|---|---|---|
| Protocol | https:// | Your server settings |
| Domain | example.com | You, once, when you buy it |
| Folder or path | /blog/ | Your site structure or CMS settings |
| Slug | how-to-clean-a-coffee-maker | You, for each page |
A good slug reads like a short label for the page, such as /services/teeth-whitening or /blog/long-tail-keywords, while a poor one is a string of numbers or a default like /?p=1234 or /article16734.php that tells a reader nothing. Google’s own example of a helpful URL is example.com/pets/cats.html, compared with a URL made of random identifiers, which it calls less helpful for users (Google SEO Starter Guide).
Does the slug affect rankings?
A slug affects rankings far less than most SEO checklists suggest. Google’s SEO Starter Guide says that from a ranking perspective, keywords in the domain name or URL path alone have hardly any effect beyond appearing in breadcrumbs, which are the path Google sometimes shows above a result instead of the full address (Google SEO Starter Guide). That means renaming a slug to squeeze in a keyword will not move a page up on its own.
Slugs still matter, for reasons that have more to do with people than with algorithms. Parts of the URL can show in search results, so a clear slug helps a searcher decide your page is the one they want, a readable link tells people what they are getting when it is pasted into an email or a chat, and a tidy, logical URL structure helps Google crawl a site efficiently (Google URL structure best practices). The biggest SEO risk around slugs is changing them carelessly, which we cover below.
How to write a good slug
These are the rules we follow when we set slugs for client pages, and the first three come straight from Google’s URL guidelines (Google Search Central).
- Use readable words instead of ID numbers, in the language your audience searches in.
- Separate words with hyphens, because Google recommends hyphens over underscores and lists joined words like greendress as not recommended.
- Keep everything lowercase, since Google treats /APPLE and /apple as two different URLs, and mixed case invites duplicate addresses.
- Describe the page in three to six words where you can, using the main term people search for, such as /blog/roof-replacement-cost rather than the full title of the post.
- Drop filler words like “a”, “the” and “and” when the slug still reads naturally without them, and keep them when removing them would make it confusing.
- Leave out years, prices and other details that will go out of date, so you never have to change the URL just because the content was updated.
- Never repeat a keyword or stack variations, since keyword stuffing is against Google’s spam policies and looks untrustworthy in a link.
This page breaks a couple of those rules, because its slug repeats “seo slug” and is longer than we would write today. We are keeping it, since the URL already has years of history with Google and changing it would mean a redirect for a gain the Starter Guide says is close to nothing, which is exactly the trade-off most site owners face with their own older pages.
How to set or edit a slug on common platforms
On WordPress, first check Settings, then Permalinks, and choose the “Post name” structure, which uses each post’s slug in the URL, so a title like “This Is A Great Post!” becomes this-is-a-great-post (WordPress Documentation). You can then edit the slug for any post or page before you publish. If you change the slug of a published post, WordPress tries to send visitors from the old slug to the new one with a 301 redirect (WordPress Developer Resources), but we still add the redirect in an SEO plugin or redirect manager so it is recorded and does not depend on that fallback.
On Shopify, the slug is called the URL handle, and the folder before it, such as /products/, is fixed, which we explain in our look at Shopify’s SEO strengths and limits. Shopify notes that when you change a URL on your store you can create a URL redirect, and that its redirects only work for URLs that return a 404 error (Shopify Help Center), so add a redirect every time you edit a handle on a live product or page. Most other website builders let you edit a slug in the page or SEO settings too, and before you change one, check that the platform has a redirect tool for the old address. On Weebly, for example, our Weebly SEO tips show where the page settings and 301 redirects live.
Changing a slug on a page that already ranks
Our default advice is to leave the slug of a ranking page alone, because the improvement is small and every URL change gives Google something new to process. When there is a real reason to change it, such as a slug that names a service you no longer offer, a typo, or a site restructure, do it properly.
- Set a permanent server-side redirect, a 301 or 308, from the old URL to the new one, which Google recommends whenever you change the URL a page shows in search (Google redirects guide).
- Update your own internal links and your sitemap to point to the new URL, since redirects are slower for users. If your site has a feed, an RSS feed can help Google find the updated page sooner.
- Keep the redirect for at least a year, which Google says gives it time to transfer signals, and consider keeping it indefinitely for visitors who saved the old link (Google site move guide).
- Expect some movement in rankings for a few weeks while Google recrawls, and know that Google says permanent redirects do not cause a loss in PageRank.
If you are changing many URLs at once, for example during a platform move, plan the full list of old and new addresses before anything goes live, and if you run a Shopify store, our guide to Shopify SEO site migration covers the details.
Questions we get asked
How long should an SEO slug be?
There is no official limit, but we aim for three to six words that describe the page. Shorter slugs are easier to read, share and remember, and they are less likely to need changing later.
Should the slug match the page title?
It should match the topic of the title while leaving out most of its wording. A title like “How Much Does a Roof Replacement Cost in 2026?” works well with a slug like roof-replacement-cost, which stays accurate when you update the year in the title. If you are rewriting titles, our post on how changing a page title affects SEO covers what to watch.
Should I change old slugs to add keywords?
We usually advise against it, because Google says keywords in the URL path have hardly any ranking effect on their own, so changing a ranking page’s slug just to add a keyword means taking on a redirect for very little gain.
What is the difference between a slug, a permalink and a URL?
A URL is the full web address of a page, a permalink is the permanent URL a page keeps once it is published, which is the term WordPress uses for its link settings, and the slug is only the editable part at the end that names the page. In example.com/blog/long-tail-keywords, the whole address is the URL and long-tail-keywords is the slug.
Can a slug contain numbers?
A slug can contain numbers, and they are fine when they are part of what the page is about, such as a model number, a step count or a list size like 22-strategies. Avoid numbers that go out of date, like years, and database IDs that tell readers nothing, since Google’s URL guidelines favor readable words over ID numbers.
Can two pages have the same slug?
Two pages can share a slug only if they sit in different folders, because every URL on a site has to be unique, so when a slug is already taken in the same place, most platforms change the new one automatically. WordPress, for example, adds a number such as -2 to the end of a slug that is already in use (WordPress Developer Resources).
If a new page ends in -2, another post, page or attachment already has the name you wanted, so find it and decide which page should keep it before you publish links.
Why does my SEO tool flag my slug?
SEO tools flag slugs that are long or contain stop words, underscores, capital letters or no keyword, because those rules are easy to check automatically, and a warning does not mean the page will rank worse. Fix the issues on new pages, and leave ranking pages alone unless the slug is misleading, since Google says URL keywords have hardly any effect on their own.
Our post on what an SEO score measures explains why tool scores and rankings often disagree.
If you want to know whether your URLs, titles and redirects are set up correctly, our free SEO audit checks your site for SEO, speed and AI search in about a minute, and our website optimization and SEO services pages explain how we handle URL changes and site moves for clients.
Free SEO audit
Want to know where your site stands?
Get a free score for SEO, speed and AI search, plus your top 3 fixes, in about a minute.
Keep reading
Client Stories
How did a Suwanee dentist go from page 3 to page 1 on Google in 60 days?
B-You! Dentistry in Suwanee, GA moved from position 27 to about 8 for "suwanee dental care" between March 28 and…
6 min read
SEO
How Do Construction Companies Get Clients From Google and AI Search?
How construction companies get clients from Google Maps, reviews, directories and AI search, with a 90 day plan and sourced…
7 min read
SEO
How to Do a Shopify SEO Audit (and Fix Common Shopify SEO Problems)
A step-by-step Shopify SEO audit checklist, what Shopify already handles for you, and the most common Shopify SEO problems with…
9 min read







