SEO

SEO-Friendly URLs: What Google Says About Hyphens, Keywords and WordPress Slugs

Google updated its URL structure page on 21 October 2026. What it recommends on hyphens, readable words, language, case and parameters, how much keywords in a URL matter, why filters and calendars can create too many URLs, how WordPress builds slugs, and whether to change URLs that already exist.

zabil

7 menit membaca
A wooden signpost against a clear blue sky with green, yellow, red and purple arrow-shaped signs pointing in different directions

Google updated its “URL structure best practices for Google Search” page on 21 October 2026, and in mid-October it released the first video in a new series on how Google handles URLs. For a small business the practical questions are simple. Should your page addresses use hyphens or underscores? Do keywords in a URL help you rank? Is it worth changing URLs that already exist? This guide answers them from Google’s own pages and WordPress’s own code, as of 10 November 2026.

What changed, and what did not

Search Engine Roundtable reported on 21 October that Google made a “minor change” to the section called “Use hyphens to separate words”, adding that “The overall meaning of the section really did not change”. The new wording adds a reason: underscores are commonly used by programming languages to name functions, “whereas hyphens clearly signal a word boundary”. So there is no new rule, only a clearer explanation of an old one.

What Google recommends for URLs

  • Readable words, not IDs. “When possible, use readable words rather than long ID numbers in your URLs.”
  • Hyphens between words. Google says “we recommend using hyphens (-) instead of underscores (_) to separate words in your URLs, as it helps users and search engines better identify concepts in the URL”. Joining words together, as in a /greendress style address, is also in Google’s not-recommended column.
  • Your audience’s language. Google says to “Use words in your audience’s language in the URL”. If your customers search in Indonesian, Indonesian words belong in the slug. If they search in English, use English. Pick per page, and match the language of the page.
  • One case. Google says its URL handling “is case sensitive”, so /APPLE and /apple are different URLs. If your server treats them as the same page, “convert all text to the same case”.
  • Few parameters. “Whenever possible, shorten URLs by trimming unnecessary parameters”.
  • No fragments for content. “Don’t use fragments to change the content of a page.” This matters for single-page designs that load content after a # in the address.

Do keywords in the URL help you rank?

Only a little. Google’s SEO Starter Guide says “From a ranking perspective, the keywords in the name of the domain (or URL path) alone have hardly any effect beyond appearing in breadcrumbs.” It also notes that parts of a URL can appear in results as breadcrumbs, so people can use them to judge whether a result will be useful.

Search Engine Roundtable’s write-up of the new Google video says Gary Illyes called keywords in a URL or domain an “incredibly small signal” and said Google can detect spamming in URLs. We have not watched the video, so treat that as a summary from a third party.

The practical result: write a short slug that a person can read and understand, and stop there. As examples of our own, /services/seo/ is fine, and a long chain of repeated keywords is the kind of address that helps no one. The place for keywords is your titles, headings and copy, which our keyword research guide covers.

Emojis, accents and special characters

Google’s page says “characters in the non-ASCII range should be percent encoded”. Its own example lists the percent-encoded form of an emoji address as recommended and the raw emoji form as not recommended. Ordinary Indonesian and English words use plain letters, so they need no encoding. An emoji slug would turn into a long string of percent signs and codes whenever someone pastes it into a message. We would skip it.

Filters, calendars and booking plugins

This part matters for villa, hotel and rental sites. Google describes “Additive filtering of a set of items”, using an example of hotels on the beach and with a fitness center, and says that when filters combine this way “the number of URLs (views of data) in the sites explodes”. It also warns about calendars that generate links to future and past dates “with no restrictions on start or end dates”, and says “Wherever possible, avoid the use of session IDs in URLs and consider using cookies instead.”

If your site has a filterable villa list or an availability calendar, look at what addresses it creates. Google’s suggestion is to “Consider using a robots.txt file to block Googlebot’s access to these problematic URLs”. Test any robots.txt change carefully, because a wrong rule can block pages you want found. Our Search Console guide shows how to see what Google is crawling.

How WordPress builds your URLs

In WordPress, go to Settings > Permalinks to choose a structure. WordPress’s documentation calls the default setting “Plain” or “Ugly”, with addresses like http://example.com/?p=N, where N is the number of the post in the database. It describes that style as “not optimized for search engines”. The “Pretty” style puts words in the address.

Each post or page gets a slug from its title, and you can edit it in the slug field in the editor. We ran WordPress 7.1.4’s own slug function on a sample title and it turned spaces into hyphens, so Hello World Bali Villa 2026 became hello-world-bali-villa-2026. The same test showed it leaves any underscore you type yourself, so snake_case_title here became snake_case_title-here. Check your slug before you publish.

Should you change URLs that already exist?

Usually not. WordPress’s documentation says “These URLs are permanent and should never be changed”. Google’s URL page frames its advice as a recommendation for how to write URLs. It does not say that existing underscore URLs are penalised. So our advice is to follow the hyphen rule for new pages, and to leave working addresses alone unless they are actively unhelpful, such as ID numbers or duplicates.

If you do change a URL, Google says “we recommend that you use a permanent server-side redirect whenever possible”, and that “The 301 and 308 status codes mean that a page has permanently moved to a new location.”

WordPress helps for posts, but not for pages. In its core code, when you change the slug of a published post, WordPress stores the old slug and redirects it. That code skips hierarchical content types, and pages are hierarchical. So if you rename a page from /services/ to /our-services/, WordPress core will not redirect the old address. You need a redirect from a plugin or from your server settings, and you should test it with curl -I on the old address, looking for a 301 and the new location.

For more on what happens when pages move or disappear, see how to redesign a website without losing your SEO and whether 404 errors hurt SEO.

A slug checklist for new pages

  1. Use a few readable words in the language your customers search in.
  2. Separate words with hyphens, in lower case.
  3. Leave out ID numbers, session IDs and unnecessary parameters.
  4. Do not repeat keywords to try to rank.
  5. Check the slug field before publishing, because WordPress will not turn your underscores into hyphens.
  6. Decide on one preferred address for each page and redirect the others to it.
  7. Open the live page and check it loads at the address you expect.

If your domain name is also on your list, our guide to choosing a .com or .id domain covers that decision. If you would like someone to review your site’s URLs, you can tell us about your business.

Sources, all read on 10 November 2026: Google Search Central, URL structure best practices for Google Search (last updated 21 October 2026); SEO Starter Guide; Redirects and Google Search; WordPress.org, Customize permalinks; Search Engine Roundtable, Google Updated Its URL Structure Best Practices For Hyphens In URLs (21 October 2026) and Google Search On URLs (14 October 2026); WordPress core source, wp-includes/formatting.php and query.php.

Baca lebih lanjut

Artikel terkait.

Tinggalkan komentar

Your email address will not be published. Required fields are marked *