Does Your Website Need a Directory Tree

Does Your Website Need a Directory Tree=

Credit: Flickr

One of the questions that seems to be asked regularly is does my website need a directory tree structure and should I change it to eliminate the directory. For clarity, when I talk about a directory tree, I’m talking about sites that are set up like this:

The core question is, Is there any difference between these two URL’s?

In my opinion the second URL structure is preferable because it allows you a lot more flexibility. That said, there are some caveats to be aware of. When you go with a directory tree structure, it’s really essential that you get the directory names as short as possible. If I had a nickel for every keyword-stuffed directory name I came across, I’d spend the rest of my days swinging from a hammock in Tahiti. Most people can’t resist the temptation to add in one or two extra keywords … don’t do it. When you go with a tree-less structure you aren’t forced to use names from higher in the tree, but that means there is more temptation to keyword stuff. Keep it as short as possible by using essential keywords only. I recommend the 3-5 word range with no stop words (a, of the, is, etc). With the example we are using I think this structure is too long:

It could just as easily be any of the following:

Personally I’d go with I think adding “Ford” as a KWD is important, but every implementation is going to be slightly different.

A second thing to remember: when you use a directory structure, the hierarchy is forced upon you. You can’t put “/ford/” at the end without creating a 404 error page. However, when you eliminate a directory structure, you could very easily end up with something like this:

Yes, the page will still work, but it’s going be a whole lot more confusing and harder to maintain the website if you let it happen.

Just because you go with a tree-less structure doesn’t mean you can’t have middle level pages either. I would 110% recommend having these pages with some editorial content and a link to each of pages beneath it:

The next question is should I change my existing website to this new format. In my experience, radically changing a URL structure is never fun or painless and should only be done if something is wrong, broken or needs to be fixed. If your current site implementation has low traffic, has session ID’s and lots of other parameters in the URL, and you decide to fix it, yes it’s something to consider. However if you are an established website with good rankings and traffic, changing the URL structure because it’s what all the other cool kids are doing isn’t a a smart move. IMHO, of course.

One last thing to consider is using a directory structure to limit crawling. Sometimes you have a section of a website that you don’t want crawled for whatever reason. If there are multiple pages, it’s a lot easier to block crawling using a directory/tree structure than making multiple entries in a robots file.

via flickr cc

Enjoyed this Post?

Recommend it to friends and colleagues!


  1. I assume if was you could skip the term Ford but if it was then would you leave Ford out of the directory structure or hit it again?

  2. Every situation is different, but in most cases I would leave the second ford out in that example you mentioned.

  3. Great article…..and I agree that shorter works better. Nice point too about it being more flexible to NOT have directory tree. This is something that’s hard to get your head round until you actually build a few sites.

  4. I’m not all that fussed about keywords in the path part of the URL at all. That is, sure as hell, spammed almost to oblivion already. Keyword in anchor text is more important, and breadcrumb navigation is useful to both users and searchengines alike.

    The danger with folder type URLs, especially on dynamic sites that employ URL rewriting, is that where a product can be reached by many different click paths, there will be multiple URLs for that product… each recording the path the user took to get there:

    and so on. That’s not a recipe for success.

    I prefer where the product has a much simpler URL for the product page, e.g.

    and it is then listed in whatever categories that apply. e.g. it might be listed in (where the page might list multiple colours) (where the page might list multiple product types)

    and so on.

    In this system the ‘path to the product’ does not feature in the URL of the product page itself.

    Breadcrumb generation is a bit more tricky, but there’s a huge advantage when the database lists all the categories a product belongs to. It’s a doddle to generate a list of links to…

    Find more Widgets

    Find more Green products

    Find more Acme Corp products

    Find more Left-Handed things

    which gives the User (remember them, they’re the ones spending their cash) simple choices to find related products in one click, rather than having to navigate miles back up a category tree and down another branch just to reach a similar product of a different colour made by a different company.

    Another benefit of this way of working is that a product can be moved to a different category, or added to multiple other categories, or the whole taxonomy of the entire product range be altered, without the URL for the product ever changing.

  5. Personally I prefer to use a directory tree. But that’s just me. This makes it easier to generate breadcrumbs as well as use address bar navigation (simply remove the last directory and you move up to the larger holding category).

    If you’ve set the site correctly, you shouldn’t have to worry too much about the page cannon.

    Just my preference. But hey, what works with somethings doesn’t work for all.

  6. You can have a product reachable under multiple paths but still have the simple URL. The breadcrumb can only go one way, but it helps with URL structure

  7. I would recommend using a directory structure over a single filename with a long string of hyphens.

    With this URL and how easy it is to understand what you will find when clicking on it, and it forces a set taxonomy for each similar category:

    Now consider this URL: it is very inflexible and can be arbitrarily setup depending on the individual author.

  8. @netpaths – You have quoted a very good example but as Michael said, Every situation is different.

  9. @netpaths

    I can only assume that you completely missed my earlier post above.

Leave a Reply

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