SEO URL Structure Guide: 13 Best Practices To Follow

URL settings are actually not complicated. What we usually refer to as 'URL optimization' mainly focuses on optimizing the Slug.

A Slug refers to the string of characters after the domain name, which is the last segment of the URL, and it is the most crucial part when creating an SEO-friendly URL.

Although including keywords in the URL has a relatively limited direct impact on rankings, SEO is precisely built up from countless details.

A URL that is clearly structured and accurately expressed not only helps search engines better understand page content but also allows users to determine if the page meets their needs before clicking, thereby improving user experience and click-through rates.

First, before we begin, we need to understand the hierarchical structure of URLs.

URL's Hierarchical Structure

Here I directly quote Ahrefs' URL structure analysis diagram:

URL Structure Example from Ahrefs

URL Structure - Image from Ahrefs - https://ahrefs.com/blog/seo-friendly-urls/

This is the structure of a URL. A logical URL hierarchical structure not only makes it clear to users at a glance but also helps search engines understand the relationship between pages.

It is generally recommended that the path hierarchy does not exceed 3 levels, and directory names should be relevant to the actual content. When creating SEO-friendly URLs, the focus is on the 'Slug' part at the end.

How to Create SEO-Friendly URLs/Slugs?

The following table combines Google's official URL optimization documentation (https://developers.google.com/search/docs/crawling-indexing/url-structure) and best practices summarized from my personal experience:

Best PracticesDescription and Examples
Use descriptive URLs, include keywords, avoid duplicate keywords

Use readable keywords instead of numerical IDs.

https://example.com/wiki/Aviation
https://example.com/index.php?topic=428871
Use target audience language

URLs use language familiar to the user.

https://example.com/lebensmittel/pfefferminz(German)
https://example.com/ペパーミント(Japanese)
Use UTF-8 encoding

Encode non-ASCII characters (e.g., Chinese, Arabic, emojis) using UTF-8.

https://example.com/%E6%9D%82%E8%B4%A7/%E8%96%84%E8%8D%B7
https://example.com/杂货/薄荷
Use hyphens between words

Recommended to use hyphens (-), not underscores (_) or concatenated words.

https://example.com/summer-clothing/filter
https://example.com/summer_clothing
Keep it concise, avoid using URL parameters like #, ?, and underscores

Avoid redundant and meaningless parameters.

https://example.com/seo-url-optimization
https://example.com/article?id=123&session=456&utm_source=facebook&utm_campaign=spring
Consistently use lowercase

URLs are case-sensitive; it's recommended to unify to lowercase. For example, /Apple and /apple are treated as different pages, so directory style should be unified.

Adopt a logical hierarchical structure

Organize content using clear directories. For example, https://example.com/pets/cats.html clearly indicates that the "cats" page is located under the "pets" category.

Avoid fragment and dynamic parameter issues

Do not use URL fragments (e.g., #section) to load content. Also, avoid dynamic parameters that can lead to crawling confusion. For instance, do not use /product/t-shirt#black to display different colors; instead, use unique URLs for each variation.

Standardize parameter format

When constructing URLs with parameters, adhere to standard syntax such as ?key=value&key2=value2. If multiple values are required for a single key, separate them with commas. Avoid using duplicate parameters or unusual delimiters.

Implement multi-region/multi-language structure

For international content, use country-code Top-Level Domains (ccTLDs) or subdirectories. For example, https://example.de or https://example.com/de/ combined with hreflang tags is the preferred approach (multilingual plugins can assist with this implementation).

Use HTTPS

Google has explicitly stated that HTTPS is a positive ranking signal. Browsers display an "unsafe" warning for HTTP websites, which can significantly reduce user trust and click-through rates.

Remove numbers and years

Including numbers or years in URLs increases the complexity of future maintenance. If the content's year is updated, the URL would also need to be changed.

https://example.com/seo-guide
https://example.com/seo-guide-2023
Shorten URLs by removing articles, prepositions, and conjunctions

Shorter URLs are generally easier to remember and more convenient to share.

https://example.com/seo-url-optimization
https://example.com/the-basics-of-seo-and-url-optimization

URL Optimization Practices

ToC Site URL Structure Optimization Practices

For large e-commerce sites, Slug structures are quite diverse. Therefore, when processing URLs for e-commerce sites, in addition to the guidelines mentioned above, it is also necessary to avoid repeating the same vocabulary within the Slug.

Example One:

For example, for category pages. This situation should be avoided:

https://domain.com/men/men-shoes/men-sneakers

This Slug repeats "men" 3 times; try to avoid it as much as possible.

We can change it to:

https://domain.com/men/shoes/sneakers

Example Two:

For e-commerce websites with fewer categories and products, if you want to optimize category pages for SEO, you can set up the URL structure as follows:

Category Pages:
  • https://domain.com/men-shoes-under-100(domain/category)
  • https://domain.com/men-running-shoes(domain/category)
  • https://domain.com/men-walking-shoes(domain/category)
Product Detail Pages:

Then, for this type of website, our product detail page URLs can be set as:

  • https://domain.com/men-shoes-under-100/JH5185(domain/category/model)

ToB Site URL Structure Optimization Practices

The URL structure settings for ToB sites will be simpler than those for ToC sites: We take a few core pages of a B-side official website as an example:

Homepage
https://example-networks.com/
Product Category Page
https://example-networks.com/products
Product Sub-category Pages
  • https://example-networks.com/products/category1
  • https://example-networks.com/products/category2
  • https://example-networks.com/products/category3
User Case Aggregation Page
https://example-networks.com/use-cases
User Case Pages
  • https://example-networks.com/use-cases/user-case-1
  • https://example-networks.com/use-cases/user-case-2
  • https://example-networks.com/use-cases/user-case-3
Article Pages

For article pages, any of these three options is acceptable:

  • https://example-networks.com/newsroom/introducing-the-example
  • https://example-networks.com/blog/introducing-the-example
  • https://example-networks.com/introducing-the-example

Article URL Optimization Practices

For example, I have an article title: "Solar Panel Installation Cost: Your Ultimate Guide in 202X"

Then the URL can be set as:

  • https://example.com/solar-panel-installation-cost/

    (Retained core keywords, moderately concise, removed definite articles, prepositions, and other irrelevant words)

  • https://example.com/solar-panel-cost/
  • https://example.com/solar-installation-cost/

WWW Simplification

Modern websites tend to remove the 'www' prefix to make domain names shorter and easier to remember. This is not a mandatory requirement, nor is it an SEO ranking factor. However, whether you keep or remove it, you must ensure that all URLs across the entire site are consistent.

If both 'www' and non-'www' pages exist simultaneously, they might be considered duplicate pages. In this case, we need to use a 301 redirect strategy to point the old URL to the new, currently active URL.

Redirection Strategy

When modifying URLs (such as changing Slugs, adjusting directory structures) or merging pages, 301 permanent redirection must be used to point old URLs to new URLs, in order to retain SEO authority and prevent users from encountering 404 pages.

This functionality can be achieved using the RankMath WordPress plugin, which can be configured to monitor our URL changes and automatically generate 301 redirections.

As mentioned in the best practices above, when setting URLs, we should try to avoid including numbers and years. This is also to prevent the loss of external link authority or traffic due to incorrect 301 redirection after future URL changes.

Important Note: Another point to note is to never optimize solely for the sake of SEO optimization. If the current page traffic is acceptable, it is not recommended to easily modify URLs, and spending too much time on URL optimization is not worthwhile.

How to Check URL Structure

After understanding the best practices for SEO-friendly URL structures, you might want to check if your current URLs follow these guidelines. Our comprehensive URL checker tool can help you analyze and optimize your website's URL structure.

Related Articles

Related Tools