Short answer: A URL slug is the part of an address that identifies a page, usually at the end, such as 301-redirect in /guides/301-redirect/. Google recommends simple, descriptive words in your audience’s language, hyphens between words and as few parameters as you can. Keep every URL in one case, because Google treats /APPLE and /apple as different addresses.
What Google recommends for URLs
| Practice | Do | Avoid |
|---|---|---|
| Words | Readable, descriptive words | Long ID numbers |
| Language | Your audience’s language, transliterated if needed | Words your audience doesn’t search with |
| Separators | Hyphens between words | Underscores, or words joined together |
| Parameters | As few as you can | Parameters that don’t change the content, such as session IDs |
| Letter case | One case for every address | Two cases that open the same page |
| Fragments | The History API if JavaScript changes the content | A # fragment to change the content |
From Google Search Central, “URL structure best practices for Google Search”, read November 3, 2026.
The slug of an address
MDN, the reference many web developers use, applies the idea to its own pages: the slug is the part of the address after the language and /docs/. In /guides/301-redirect/ the slug is 301-redirect, and the folder before it says the page is a guide.
On a site in two languages, each version gets its own slug in its own language. Our Spanish guide on the same topic lives at /es/guias/redireccion-301/. Our guide to hreflang covers how to tell Google the two pages go together.
Why the structure matters to Google
Google asks for URLs built logically and in the way that’s easiest for people to understand. If your URLs don’t meet its requirements, Google says it will likely crawl your site inefficiently.
Overly complex URLs, especially with several parameters, can create many addresses for the same or similar content. Googlebot may then use much more bandwidth than it needs, or fail to index all your content.
How to write a good URL
- Write the slug with a few readable words that say what the page is about.
- Use the language of the page, with translated words on each language version.
- Separate the words with hyphens, not underscores.
- Use one case for every URL; lowercase is the simplest.
- Group pages in folders that follow your site, such as /guides/ for guides.
- Leave out parameters that don’t change the content, such as session IDs.
- If you change a slug, redirect the old address to the new one with a 301 or 308.
Our guide to the 301 redirect explains how to set up that last step.
What our own URLs look like
At 2:52 AM on November 3 we checked the 284 URLs in our sitemap, 142 in English and 142 in Spanish. None has capital letters, underscores, parameters, # fragments or accented letters, and all end in a slash.
Our Spanish pages live under /es/ with Spanish words, written without accents or ñ, such as /es/diseno-web/, so no address needs percent-encoding. Most pages sit two or three folders deep, such as /seo/local-seo/.
We also found that our server answered capitalized versions, such as /GUIDES/301-REDIRECT/, with the same page and a 200, and /Es/ ones with a 404. Since 2:55 AM on November 3 they redirect with a 301 to the lowercase address.
Before you publish a URL
- The slug says what the page is about.
- The words are in the page’s language.
- Hyphens separate the words.
- The URL uses a single case.
- No parameter is there that doesn’t change the content.
- An old slug redirects to the new one.
RememberWrite short slugs with descriptive words in your visitors’ language, separated by hyphens and in one case. Change them as little as you can, and redirect the old address with a 301 or 308 when you do.
If you want us to check the URLs of your site, see our technical SEO service.
Quick answers about URL slugs
Should I use hyphens or underscores in URLs?
Hyphens. Google recommends them because they clearly mark where a word ends, while underscores are often used to keep words together, as in programming names such as format_date.
Do capital letters in a URL matter?
Yes. Google treats /APPLE and /apple as different URLs with their own content. If your server shows the same page for both, Google recommends converting all the text to one case.
Should Spanish URLs use accents or ñ?
You can use words in your audience’s language. Google asks you to percent-encode characters outside ASCII in your links, so writing them without accents, as we do with /es/diseno-web/, avoids the encoding.
How long should a URL slug be?
Google doesn’t set a length. It asks for a simple structure with readable words and as few parameters as you can, so keep the slug to the words that say what the page is about.
Should I change old URLs to make them better?
Only with a good reason. Google recommends a permanent 301 or 308 redirect from each old address, and warns that any big change can bring ranking swings while it crawls and indexes your site again.
Sources
Read on November 3, 2026. Google Search Central: URL structure best practices for Google Search and How to move a site. MDN: Slug. Our own case: the URLs in our sitemap and our server’s answers to capitalized addresses, on November 3, 2026.
