SEO and marketing

URLs for Google: hyphen or underscore and other rules that matter

By Edgar Jaimes 3 min read

Two people review a site structure plan on paper next to laptops

Google updated its crawlable URL guidance: use hyphens to separate words. Learn the rules on capitalization, parameters and accents for clean URLs.

Your catalog has a page called /Servicios_Web/Diseño Premium. It looks fine on the customer's phone, but in the link you share on WhatsApp it shows up with strange symbols. And on Google, there are two versions of the same page competing with each other.

The URL is one of the few things in SEO you control 100%. On October 23, 2026, Google updated its guidance on crawlable URL structures, according to the Search Central updates log, and clarified when to use hyphens and underscores. Here are the rules.

Hyphen or underscore in a URL?

Use a hyphen (-) to separate words. Google's documentation explains that hyphens clearly mark the boundary between words, while the underscore is usually used in programming to join names. It is also not advisable to run words together without a separator.

FormExampleRecommended?
With hyphens/diseno-web-para-tiendas/Yes
With underscore/diseno_web_para_tiendas/No
No separator/disenowebparatiendas/No
Two hands point at a laptop screen while reviewing a web page
Reviewing URLs as a team avoids surprises before publishing. Photo: Unsplash

Can I use accents, ñ or spaces?

You can write in your language, but characters outside ASCII must be percent-encoded. Google says so in its guide: use your audience's language in URLs, and reserved characters must be encoded. In practice, an ñ ends up as %C3%B1 when someone copies the link.

So, for businesses in Colombia and the USA, the cleanest approach is to write the slug in lowercase, without accents or spaces and with hyphens. It is the same logic we use when choosing a .co or .com domain: less friction when sharing and remembering.

Does capitalization matter in the URL?

Yes, it matters: Google treats /APPLE and /apple as distinct URLs with their own content. If your server answers both the same way, you will have duplicates without realizing it. The guide's recommendation is to standardize on a single form, and the simplest is always lowercase.

Common mistake: letting the same page respond at /Contacto and /contacto. Pick one and redirect the other with a permanent redirect, as we explain in 301 redirects on Cloudflare Pages.

What do I do about parameters and session IDs?

Remove parameters that do not change the content. Google warns that referral, shopping sort or session parameters can create a huge number of duplicate URLs. Filters that stack on top of each other also multiply combinations, so it is wise to limit filtered views to a manageable set.

For key-value pairs, the guide says to use = and &, for example ?categoria=vestidos&orden=precio. For several values of the same key, use a separator that does not clash with the standard, such as a comma. And instead of session IDs in the URL, Google suggests using cookies.

Watch out with campaigns: UTM parameters are useful for measuring, but they should not be the link you index. See how to use them well in UTM in GA4.

Work desk with several laptops and phones seen from above
Every tool that generates links can add parameters: check what your team publishes. Photo: Unsplash

What else should you check in your structure?

Use readable words instead of ID numbers, do not change content with fragments and link using root paths. These are the other rules the guide covers:

  1. Readable words: /servicios/seo/ instead of /p?id=48213.
  2. No fragments: Google generally does not support changing content with #. If you use JavaScript, turn to the History API.
  3. Root links: links with a root path (/servicios/) avoid generating infinite URL spaces.
  4. Multi-regional: use country domains or subdirectories such as /en/. If you have several languages, complete the setup with hreflang.
  5. Robots.txt: block crawling of internal search results, calendars and faceted navigation that generate duplicates.

When you publish changes, let Google know with Search Console and the sitemap. And make sure each page title matches its URL, as we saw in titles and meta descriptions.

In short

Your page /Servicios_Web/Diseño Premium gets fixed with three decisions: lowercase, hyphens and words without accents, such as /servicios-web/diseno-premium/. If you already have published URLs, do not change them on a whim: if you do, redirect the old ones. If you want a technical review of your site, see our SEO and GEO service.

Frequently asked questions

Does Google prefer a hyphen or an underscore in URLs?

It prefers the hyphen. Google's documentation explains that hyphens clearly mark the boundary between words, while the underscore is often used in programming to join names.

Can I use accents or ñ in a URL?

Google lets you use your audience's language in URLs, but characters outside ASCII must be percent-encoded. That is why many businesses prefer the version without accents in the slug.

Does it matter if I write the URL in capital letters?

Yes. According to Google, URLs are case sensitive, and /APPLE and /apple are treated as distinct URLs with their own content.

What do I do with parameters like utm or session parameters?

Google recommends removing parameters that do not change the content, because they create many duplicate URLs. Also avoid session IDs and use cookies instead.

Does changing my current URLs improve my rankings?

The documentation does not promise ranking improvements from changing a URL. If it already works, leave it. If you change it, redirect the old one to the new one.

Do not stop at the theory: apply it to your business

We implement SEO and GEO with AI end to end, with your real operation. The first conversation is free.

Keep reading