What a URL slug needs to do

A URL slug is the identifying part of a page address, usually near the end. In example.com/guides/choose-url-slugs, the slug is choose-url-slugs. It works alongside the rest of the URL: the guides folder provides context, while the slug identifies the specific page.

A clear slug gives someone a useful clue about a page when they see its address in a message, document, or search result. It can also help the people maintaining a site recognize pages in reports and content lists. A slug does not need to summarize every point on the page. Its job is to be recognizable, distinct, and reasonably stable.

Start with the page’s main purpose

Before writing a slug, describe the page in a few plain words. If the page teaches beginners how to choose URL slugs, choose-url-slugs is more helpful than page-27 or seo-tips. Use terms a reader would naturally connect with the page. You can include a relevant search phrase when it fits, but repeating variations of the same words makes the address harder to read without making the page more useful.

Keep only words that help identify the page. Words such as a, the, or for can often be removed, but they are worth keeping when removal makes the meaning awkward or unclear. Compare how-to-write-for-the-web with write-web: the shorter version is less precise. Aim for clarity rather than the fewest possible characters.

Use a consistent, readable format

Hyphens are a straightforward way to separate words: url-slug-guide is easier to scan than urlslugguide. Pick a consistent approach to capitalization, commonly lowercase, so editors do not create near-duplicate addresses by accident. Avoid spaces, punctuation that needs special encoding, and strings of numbers unless they serve a clear purpose.

A dated slug can become misleading if you update the page later, so leave years out of evergreen URLs unless the year is essential to the subject. Likewise, think twice before including temporary labels such as new or latest. If your site publishes in a language that uses non-Latin characters or accented letters, decide on a consistent approach that your publishing system handles reliably. Test the resulting URL before sharing it.

Make similar pages easy to tell apart

A slug should distinguish its page from nearby content. If a site has separate guides to choosing slugs and changing existing slugs, choose-url-slugs and change-url-slugs are clearer than url-slugs and url-slugs-2. The broader site structure can do some of this work: /guides/url-slugs and /glossary/url-slug may be distinct because the folders indicate different types of content.

Before publishing, check whether the proposed address is already in use or closely resembles another page’s URL. Also look at the page title and navigation label together with the slug. They need not match word for word, but they should point to the same subject. If you cannot describe how two pages differ, the content plan may need attention before either URL is finalized.

Be careful when changing a published slug

A cleaner slug is not always worth changing an established URL. People may have bookmarked or shared the old address, and your own pages may link to it. If the current slug is accurate and understandable, leaving it in place is often the simplest choice. Consider a change when it is confusing, materially inaccurate, or tied to a page that has changed purpose.

If you do change it, arrange a permanent redirect from the old URL to the most relevant new page, update internal links, and check that the new page loads as expected. Review the site’s sitemap and any canonical URL settings your publishing system uses. Avoid sending every old address to the home page; a redirect should help visitors reach what they were looking for.

Treat slug writing as a small part of publishing, not a shortcut to rankings. A quick pre-publication check—clear subject, readable words, distinct address, and no unnecessary date—will prevent many avoidable problems. The page itself still needs to answer the reader’s question.

Back to category ↗