I've audited websites where use of certain characters in URLs has resulted in duplicate content (e.g. ç encoded to %C3%A7 - so the URL that originally included the ç character also exists with %C3%A7) and where characters (often with diacritics) have led to 404 Not Found or other server errors. On one website, PDF filenames led to most PDFs returning 404 Not Found.
URLs should also be structured so they are easy to read.
SEO-friendly URLs are generally user-friendly URLs.
Characters to Avoid in URLs and Website Filenames
There are many characters URLs can and cannot contain, but to be straightforward in preventing any issues, LoveUX recommends using only (the same applies to website files such as images and PDFs):
- Letters a-z, lowercase with no diacritics
- Numbers 0-9
- Hyphens as separators (e.g. do not use spaces)
Hyphens pasted from software such as Word can be encoded incorrectly, so ensure any software used doesn't change the hyphen from how it would be typed from a keyboard.
Depending on the technical purpose of the URL, some other characters are used e.g. example.com/category/subcategory?colour=red&size=large:
- / folder separator
- ? used for a query string e.g. filtering products by colour on a category page
- & used to separate parameters in a query string
Avoid using these characters in a URL outside of the above context e.g. avoid using ampersands as follows:
Avoid using file extensions in URLs e.g:
It's usually straightforward to remove file extensions from URLs in the CMS or for a web developer to create a rule to remove them.
Removing file extensions from images (e.g. .jpg) and PDFs isn't common and given they can set expectations (e.g. you know you're downloading a PDF if the URL ends in .pdf) it may be best to leave them intact - and it doesn't seem like PDFs will be superseded any time soon, meaning those URLs should remain intact for the foreseeable future.
General URL Best Practice
Google heads up their advice on URLs with "Simple URLs convey content information."
URLs should be short but descriptive. They should be constructed in a way that is predictable with folders (separated by a forward slash) that match the hierarchical structure of the website.
A website's category structure and navigation are very important and should be finalised to inform the URL structure.
The below examples are best practice when creating new URLs and doesn't necessarily mean we recommend changing existing URLs, where other technical implications would need considering (such as whether old URLs need redirecting to new URLs).
Category and Subcategory URL Best Practice
We expect the page to show the womens' products that particular website specialises in and would expect there to be a mens URL at
E.g. for subcategories
we expect the page to display womens' coats and would expect the mens coats URL to be
The same applies when filtering content e.g. for black Patagonia jackets:
Example for sorting by price filter:
Avoid repeating keywords, which make URLs unnecessarily long and more difficult to read e.g:
Product Detail Pages URL Best Practice
Sometimes it works well, but adding product names to a category and subcategory URL can cause problems when products appear in more than one category and make URLs longer than necessary e.g:
The following shorter URL shows the information needed:
We generally recommend avoiding product codes in URLs unless they're used by target customers when searching for that product.
Blog and Article URL Best Practice
Blog URLs should follow the same pattern as the examples above.
E.g. blog homepage:
Avoid using dates where content is time sensitive. E.g. if an article is "the best something in 2021" and updated in 2022, avoiding the year in the original URL will avoid unnecessary redirects in future.
URLs for International SEO
When separate websites are needed for multilingual and/or multi-regional reasons, assuming the domain extension isn’t region-specific (i.e. is .com or .org rather than .co.uk or .fr), I recommend using URL subfolders to specify the language and region.
E.g. for multilingual websites:
example.com (primary version, such as British or US English-language)
example.com/fr/ (separate French-language version)
example.com/cy/ (separate Welsh-language version)
E.g. for multi-regional and multilingual websites:
example.com/be/fr/ (Belgian French-language version)
example.com/be/nl/ (Belgian Flemish-language version (nl is the language code for Dutch and Flemish))
Pages on multilingual and/or regional websites should appear within the above folder structures, and URLs should be translated locally. E.g. the women’s section of a French-language version of a website:
Recommended language codes are based on ISO 639-1. Country codes are based on ISO 3166-1 alpha-2 (remembering to keep these lower case for URLs; when using hreflang tags, language codes are lowercase but country codes are uppercase).
Bear in mind that every language or regional expansion of a website should be considered carefully for many reasons.
Preventing Duplicate Pages
Web pages can be duplicated at multiple URLs e.g. the content from:
could also appear at
and combinations of the above.
Only ever link to one URL of a page.
It doesn't matter whether the chosen URL includes www or not, or includes a trailing slash or not, as long as the choice is adhered to sitewide. But URLs should be https with a website SSL certificate.
http URLs should be 301 redirected to https URLs with a pattern-matched rule. Similarly, 301 redirect one to the other of the favoured www vs non-www and trailing slash vs non-trailing slash URLs.
More information on redirects: https://developers.google.com/search/docs/advanced/crawling/301-redirects
Only use recommended characters in URLs.
Short and descriptive URLs are easy to read and understand for website visitors and search bots. Studies have shown descriptive and shorter URLs are more likely to be clicked and shared.
A page should only be available at one URL.
Once set, URLs should ideally not change. Make them best-practice once, and they will be best practice for years to come. If changing URLs is necessary, technical considerations include whether the old URLs need redirecting to the new URLs.