hi, i’m amr. url decisions get made once, when a site or a cms is set up, and then live for years. google’s page on url structure best practices is short, and a few of its rules are easy to break by accident, especially on a bilingual site like this one.
what google says, in its own words
- “we recommend using hyphens (-) instead of underscores (_) to separate words in your URLs”, because underscores are often used in code to join terms
- “use readable words rather than long ID numbers in your URLs”, in the language of your audience, transliterated where that helps
- reserved characters must be percent-encoded, and “characters in the non-ASCII range should be percent encoded” in links
- google search “generally doesn’t support URL fragments”, so don’t use a fragment to change page content. the page points to the history api for javascript sites
- parameters use key=value pairs joined with &, and parameters that don’t change content should be removed where possible
- google’s url handling is case sensitive, so /APPLE and /apple are different urls. if your server treats them the same, convert urls to one case
- complex urls with many parameters, additive filters, sorting and session ids can create huge numbers of near-duplicate urls
- for infinite calendars, the page suggests nofollow on links to future calendar pages, and it suggests cookies instead of session ids in urls
the page doesn’t say url words are a ranking factor, gives no maximum url length, and doesn’t set a number of parameters that counts as too many.
my reading, not google’s wording: the rules here are about crawling and clarity, not rankings. for an arabic or bilingual site, the encoding rule is the one i’d check first, since arabic slugs are exactly the non-ascii characters it covers.
what to check this week
- check your cms permalink setting. new urls should use hyphens between words
- don’t rename existing urls just to swap underscores for hyphens unless you also redirect them. a rename without a redirect leaves the old address broken
- test whether your site serves the same page at an uppercase and a lowercase version of one url. if it does, pick one case
- look for tracking or sorting parameters in your internal links and remove the ones that don’t change the content
- if your site uses #fragments to load different content, raise it with your developer, since google says it generally doesn’t support them
- for arabic slugs, check that links in your menus and posts use the encoded form
- my earlier post on redirects covers which status code to use when a url has to change
where this stops applying
existing urls that already rank are a different decision from new ones, and the page doesn’t cover migrations. i haven’t audited any site for this post.
start scaling — if your urls mix cases, carry tracking parameters or lean on fragments, a one-hour crawl will show how many duplicate addresses your site is exposing. let’s connect.
Sources: Google Search Central, “URL structure best practices for Google Search” (developers.google.com/search/docs/crawling-indexing/url-structure). Figures are published product documentation, not verified results from Amr’s own client accounts.