Opens in a new tab

Technical SEO

URL slug: how to write SEO-friendly URLs

What a URL slug is, what Google recommends for URLs, how to write a good one and what we found in our own 284 URLs.

CheckedNovember 3, 2026
Reading time
Part ofWeb design
Listen to this guide
0:00 /5:29

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

  1. Write the slug with a few readable words that say what the page is about.
  2. Use the language of the page, with translated words on each language version.
  3. Separate the words with hyphens, not underscores.
  4. Use one case for every URL; lowercase is the simplest.
  5. Group pages in folders that follow your site, such as /guides/ for guides.
  6. Leave out parameters that don’t change the content, such as session IDs.
  7. 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 each language on its own page, with its own address for Google, see our web design 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.

Pedro Galindez

Pedro Galindez

Founder of Feedback Studios, a bilingual growth studio in Miami.

Every fact in this guide is checked against its source.

Listen0:00 /5:29

More guides

Checked November 3, 2026

HTTP status codes: what they mean for your site and for Google

What HTTP status codes mean, what Google does with each one, how to check yours and what Google got from our own server.

Checked November 3, 2026

Soft 404 errors: what they are and how to fix them

What a soft 404 is, the three fixes Google gives depending on the page, how to fix one and what our own site returns.

Checked November 3, 2026

Breadcrumbs: what they are and how to add them to your website

What breadcrumbs are, the BreadcrumbList data Google reads, what Google asks of the trail, the steps to take and what we fixed in ours.

Checked November 6, 2026

Google Ads lead form assets: how to get leads inside your ad

How Google Ads lead forms work, what you need before you start, which businesses can’t use them, how to create one and how to receive the leads.

Checked November 5, 2026

aria-live: how to make screen readers announce changes on the page

What aria-live does, polite versus assertive, why the region must exist before its message, aria-atomic, and the roles that are live regions already.

Checked November 3, 2026

Meta descriptions and SEO titles: what they are and how to write them

How Google builds title links and snippets, how to write the title and the meta description of each page, how long they can be, and why Google changes them.

Next step

Tell us what you need

Write to us on WhatsApp or send us a message. We answer in English or Spanish.