Developer

How to Write URL Slugs: SEO-Friendly Rules and Non-English URL Pitfalls

A URL slug is the part at the end of a URL that describes a page. How you write it changes both how readable the URL is and how well it communicates to search engines. This article explains what a slug is, the basic rules of lowercase letters, hyphen separators, and short meaningful words, the encoding problem with non-English URLs, symbols to avoid, and redirect cautions when changing a slug after publishing.

Published: 2026-10-16

Have you ever noticed the run of words at the end of a URL, such as "https://example.com/blog/url-slug-basics"? That bold part is the URL slug. It may look like a trivial detail, but how you write it affects how readable the URL is, how easy it is to share, and even how well it communicates to search engines. This article explains what a slug is, the basic rules for writing a good one, the pitfalls of non-English URLs, and what to watch out for when changing a slug after publishing.

What Is a URL Slug

A URL slug is the trailing part of a URL that uniquely identifies a page. For the URL "https://example.com/guides/url-slug-basics," the final "url-slug-basics" is the slug. Many blogs and CMSs generate a slug automatically from the article title, but in most cases you can set it manually as you like.

The role of a slug is to show clearly, to both people and machines, what the page is about. A number-only URL like "/p?id=12345" works technically, but you cannot tell its content at a glance. By contrast, if it contains descriptive words like "/url-slug-basics," you get a rough sense of the topic just by looking at the URL.

Turning a title into a proper slug takes some formatting work to follow the rules. When shaping a title into an alphanumeric slug, the Slug Generator is handy because it performs the formatting, such as lowercasing and hyphen separation, all at once.

How Slugs Relate to SEO

In SEO (search engine optimization), a slug is an element you should not overweight, but cannot ignore either. It is not a major factor that directly moves rankings much, but it has an indirect effect in several ways.

  • A clue to content: the words in a URL serve as a supplementary clue that helps search engines understand the page.
  • Click-through rate: when a URL appears in search results or on social media, a descriptive slug feels reassuring and is more likely to be clicked.
  • Natural backlinks: when other sites link to you, a meaningful slug fits naturally as anchor text or context.

In short, a slug is less a "direct ranking boost" and more a foundation for correctly communicating content to both users and search engines. There is no need to cram in keywords; the ideal is to include concise words that capture the content.

Basic Rules for a Good Slug

Slugs that are readable and friendly to both SEO and users share common basic rules. Master the following three points and you can create a suitable slug in almost any situation.

RuleBad exampleGood example
Use lowercase letters/URL-Slug-Basics/url-slug-basics
Separate words with hyphens/url_slug_basics/url-slug-basics
Short and meaningful/how-to-write-a-good-url-slug-for-seo/url-slug-basics

1. Standardize on lowercase

The path part of a URL can be case-sensitive depending on the server. If uppercase is mixed in, "/Page" and "/page" may be treated as different pages, which can cause duplicate content or 404 errors. It is safest to keep everything lowercase.

2. Use hyphens (-) to separate words

When joining multiple words, use a hyphen (-) rather than an underscore (_). Search engines recognize a hyphen as a word separator, whereas they may not treat an underscore as one. "url-slug-basics" is read as three words, but "url_slug_basics" risks being read as a single blob.

3. Keep it short and understandable

Limit the slug to the minimum words that describe the content. Translating a whole title into a long chain makes the URL verbose and hard to read, and it wraps when shared. The trick is to drop words that work fine without them, such as articles (a, the) and conjunctions (and, of).

The Non-English URL Problem: Encoding and Readability

What happens if you turn a non-English title directly into a non-English slug? A URL like "/slug-no-kiso" written in Japanese characters may display as-is in the browser address bar, but when it is actually exchanged in links or shares, it is converted into a format called "percent encoding."

/スラッグ → /%E3%82%B9%E3%83%A9%E3%83%83%E3%82%B0

As shown, a single non-English character is replaced by a long run of symbols like "%E3%82%B9." This leads to the following problems.

  • The URL becomes extremely long: even a few characters expand to dozens once encoded.
  • It breaks on copy and paste: pasted into social media or chat, it can appear as an unintelligible string of symbols.
  • Hard to share or remember: people lose the cues to read or recall the URL.

For this reason, it is safest to write slugs in alphanumeric characters rather than non-English text. When shaping a non-English title into an alphanumeric slug, replace it with romanized or English words that capture the content, then format with lowercase and hyphens. The Slug Generator helps you do this conversion quickly.

Symbols and Styles to Avoid

There are characters and styles you should avoid in a slug. Because only a limited set of characters is safe to handle in a URL, steer clear of the following.

AvoidReason
SpacesEncoded to "%20" and break the URL; replace with a hyphen
UppercaseMay be treated as a different page depending on the environment
Symbols (! ? & # % etc.)Carry special meaning in URLs and cause malfunctions or encoding
Underscores (_)Less likely to be recognized as a word separator
Repeated or trailing hyphens"--" or a trailing "-" looks poor and is redundant

As a rule, remember that the only safe characters are lowercase letters (a-z), digits (0-9), and the hyphen (-) as a separator. Other symbols and full-width characters tend to cause trouble, so avoid them in principle.

Cautions When Changing a Slug: Redirects

The thing to be most careful about is changing the slug of an already published page later on. Changing the slug changes the URL itself, so the old URL becomes a non-existent page (a 404 error). This causes real harm in the following ways.

  • Existing links break: backlinks from other sites and social media, as well as bookmarks, all become invalid.
  • SEO value is not carried over: the search value the old URL built up does not automatically transfer to the new URL.
  • You lose visitors: people who open the old URL hit an error screen and leave.

To prevent this, the basic step is to set up a "301 redirect" (a permanent forward) from the old URL to the new one. With a 301 redirect, visitors are automatically guided to the new URL, and the search value is more likely to carry over as well.

Rule of thumb: do not change a slug carelessly after publishing. When you must, always set up a 301 redirect.

Put the other way around, if you choose a good slug from the start, you avoid the very trouble of changing it and setting up redirects later. Before publishing, shape it according to the basic rules: lowercase, hyphen-separated, short, and meaningful. You can do the formatting from a title all at once with the Slug Generator.

Please note that this article is intended to provide general information. How to set up redirects and their impact on SEO vary with the CMS, server, and search engine specifications you use. Make your decision after checking the latest official information and documentation.

FAQ

What is a URL slug?

A URL slug is the trailing part of a URL that uniquely identifies a page. For "https://example.com/guides/url-slug-basics," the final "url-slug-basics" is the slug. Its role is to show clearly, to both people and search engines, what the page is about.

Does a slug affect SEO?

It is not a major factor that directly moves rankings much, but it has an indirect effect. The words in a URL serve as a clue that helps search engines understand the content, and a descriptive slug raises the click-through rate in search results and on social media. Rather than cramming in keywords, a concise slug that captures the content is ideal.

Can I use non-English characters directly in a slug?

It is not recommended. Non-English URLs are percent-encoded when shared, turning "/slug" into a long run of symbols like "/%E3%82%B9...". The URL becomes extremely long, breaks on copy, and is hard to read. It is safer to replace it with alphanumeric characters that describe the content and format with lowercase and hyphens.

Should I separate words with a hyphen or an underscore?

Use a hyphen (-). Search engines recognize a hyphen as a word separator, but they may not treat an underscore (_) as one. "url-slug-basics" is read as three words, whereas "url_slug_basics" risks being read as a single blob.

Is the text I enter in the Slug Generator sent to a server?

WAZA TOOLS' Slug Generator runs entirely in your browser, so the text you enter is never sent to or stored on a server. It works on smartphones too, and you can create slugs as many times as you like, for free.