Lawrence  Lesch

Lawrence Lesch


Should You Choose A Flat Or Tree URL Structure

Through examining the benefits and limitations of each, best practices become apparent

As a web developer, you will likely need to be involved in a conversation about URL structure.

Ideally, a URL structure will work great for users, crawlers, and will be super easy to maintain. Making this a reality is definitely possible, however, some strategic thinking is definitely required in the planning stage.

So, the question arises — should you structure your site, using a tree or flat URL structure? To nest or not to nest? That is today’s question.

The anatomy of a URL

anatomy of a url

Image by Content King

Before we discuss how to organize URLs, let’s quickly recap the components of one:

  • Protocol: https://
  • Subdomain: www
  • Domain:
  • Directory: about
  • Page: team
  • Parameters: ?member=kevin
  • Fragment: #experience

Best practices include keeping the directory names short, to allow URLs being as short as possible. According to Ryte Wiki:

If you want a URL to appear in the search results complete and not truncated, it should be a maximum of 74 characters. Shorter URL can help to increase the Click Through Rate of the snippet.

#javascript #ux #seo

Should You Choose A Flat Or Tree URL Structure