Some SEO consultants recommend “flat” URL structures. However, there is no evidence that a flat URL structure is better than a clearly hierarchical URL structure. While there is some debate in the SEO community, most reputable sources agree that there is no SEO/SERP benefit to flattening URL structure, and that hierarchical URLs are better for UX, crawling, and data analysis.
Since the flat site architecture concept appeared on the SEO horizon… many SEO consultants [have gotten] it wrong. The flat site architecture concept is related to the click distance between pages in a site, and how relevancy is distributed according to internal links structure — yet has nothing to do with URLs.
The main misunderstanding was, and unfortunately still is, that you have to get rid of directories in URL structures. Although it is widely agreed that you may want to keep URLs short and locate keywords close to the root or left part of the URL, there are many reasons why you should keep a certain structure of folders or directories
What is a flat URL?
A flat URL refers to the path segment of a URL being not more than one “level” deep.
[The path contains data], usually organized in hierarchical form, that appears as a sequence of segments separated by slashes. Such a sequence may resemble or map exactly to a file system path, but does not always imply a relation to one.
In other words, a flat URL structure is one in which all URLs appear at the top level, with no hierarchy.
Let’s imagine, for example, that you have a website selling greeting cards; you may have an assortment of cards which you categorize as “musical” (the kinds of cards that play back a recording when opened). You want users to be able to locate these cards independently, but you also want users to be able to navigate, via subcategories, to musical cards for specific occasions and holidays. Let’s examine how this would be treated in a hierarchical URL structure and a flat URL structure:
- Hierarchical URLs
- Flat URLs
How flat is too flat?
As you may have noticed in the examples above, because there is no hierarchy in the flat URL structure, problems become apparent when multiple hierarchical categories use the same name (i.e. the delineation between “musical birthday cards” and “musical New Year’s cards”).
While it may be technically possible to present different content at a single URL for each user based on their flow through the website or entry-point, this will create a very confusing user experience, and make it difficult or impossible for search engines to index the site’s content correctly, in it’s entirety.
A solution to this problem is to maintain a pseudo hierarchical URL structure, replacing slashes (
/) with dashes (
-). For example:
- Alternative Flat URLs
However, the question remains: why use a flat URL structure over a hierarchical one?
Arguments for Flat URLs
There are four arguments SEO consultants make when recommending flat URLs over hierarchical URLs:
- Nested PageRank
- The further a page resides from the root domain, the less PageRank is attributed to that page.
- URL keyword density
- The longer the URL, the less emphasis is placed on targeted keywords in the URL.
- The shorter a URL is, the more user-friendly, sharable, and marketable it is, leading to increased conversion.
- URL migration
- Relying on directories negatively affects the ability to migrate URLs in the future with minimal SEO impact.
Note: The arguments above make incorrect assumptions.
URL Structure vs Site Architecture
While it is true that long, unreadable URLs do not lend themselves to good SEO or good UX, a site’s depth (architecture) is measured by how many clicks are required to navigate from one page to another (“click distance”) and by how pages are cross-linked; the URL structure, number of directories, and keyword positioning is irrelevant to a site’s “flatness” as interpreted by search engines.
Google’s Matt Cutts debunks many of the incorrect assumptions about how URL structure affects search rankings:
- Does the number of subdirectories in a URL affect its ranking?
[At Google,] there is virtually no difference [between flat URLs and hierarchical URLs]… It can be very helpful for users if you have subdirectories… [Organizing content within subdirectories] can be a great thing for usability, and I definitely recommend having your site categorized like that… Having one or two extra directories [in your URLs is] not a major factor in Google’s search engine rankings.
- How does URL structure affect PageRank?
Google doesn’t worry about how deep a set of directories is.
- Does the position of keywords in the URL affect ranking?
[While] it does help a little bit to have keywords in the URL… if there is a convenient way [to structure the URLs in a way] that’s good for users… [don’t worry about] how deep the [keywords] are in the path; take the first 2–5 words [of the content] and use that as the URL. Don’t use [too many] words [in the URL], because that looks spammy to users, and people will probably not click through as much. [Worry less about the position of keywords in the URL, and focus more on] having great content that people want to link to or that people want to find out about.
Google’s John Mueller also addressed URL length, stating the Google will “crawl and index URLs over 1000 characters long – but that doesn’t mean it’s a good practice”. The common SEO recommendation is to limit the full, indexed URL (including the scheme [
https] and host [domain]) to between 75–115 characters in length to allow the full URL to be displayed in SERPs and preserve the readability and shareability of links.
Tip: While shorter URLs are preferred for readability, excessively short URLs, and supremely flat URLs are not recommended. Users should be able to predict content based on the URL; shorter, readable, memorable URLs are good for users, and hierarchy can help in that.
Benefits of Hierarchical URLs
Hierarchical URLs address the failings of flat URLs.
Search Engine Results Pages (SERPs)
Structured hierarchical URLs reinforce a search engine’s semantic understanding of content; search engines use URLs to calculate link value, and highlight keywords in URLs on SERPs. URLs containing keywords hold more value, rank higher in results, and are more likely to draw a user’s attention.
Because URLs appear in search engine results, hierarchical URLs with relevant keywords help localize a user in a site’s content, and provide hints at additional content that may be offered on a site – adding to a site’s authority.
Tip: Adding semantic markup and using schema (structured data) in combination with a well organized, hierarchical URL structure will increase the chances of breadcrumbs displaying on SERPs.
The primary argument for a flat URL structure is that flat URLs are memorable. Recent moves by search engines and browser vendors have shown that the memorability of URLs is not a critical element of a user journey. Ease of navigation and good SERP results are more important factors to discovery and conversion.
“Intuitive URLs” are simple URLs that may be easily guessed by users, these types of URLs are easy to remember and can increase direct traffic. A hierarchical structure provides a better user experience & improves the SERP.
The URL, as it appears in the browser toolbar, serves as a virtual breadcrumb trail. It provides users a general context to content hierarchy, and it provides an opportunity for more advanced users to manually alter the URL to retrace their path in to broader sections of the site. Removing this data removes relevant context from users.
Hierarchical structures are a fundamental element of the web. Search engines and analytics tools are designed to crawl and analyze content and user flow through hierarchical tree structures. Structured URLs help semantics by revealing how a site’s content is structured.
As mentioned above, flattening the URL structure removes important context from both users and search engines. In our example above, both
/occasion/birthday/musical/ would be replaced in a flat URL structure with a single URL –
/musical/. Does that address contain content from both categories? Neither? How are search engines (or users) to interpret that content?
Note: It is speculated that Google practices “URL stripping”, whereby “directories” are systematically removed from the path and crawled to discover new content. Therefor, it is important for category pages to contain a relevant description and links to its contents. “Virtual directories” which return no content or a 404 status code when queried directly may result in extra crawl errors.
It is essential to analyze organic traffic by sections of a site through content drill down reports available in analytics tools; these tools rely on structured URLs to monitor user flow.
Gathering data on indexed pages is made easier with hierarchical URLs, enabling Google queries like
site:example.com/category/. As noted below, Google has limits on how many results can be returned with a single query. For sites with many URLs, refining a indexing queries to subcategories can workaround these limitations.
Note: Google limits the maximum number of search results for a single query to 1000 results.
When migrating to a new URL structure, effective redirection is critical maintaining conversions across direct and organic traffic. Redirection is made easier with hierarchical URLs because regular expressions can be used to redirect entire sections of URLs to a new location.
In any case, migrating a site’s URL structure typically does have a temporary negative impact on organic traffic – usually a 10–20% drop in organic traffic can be expected during the first 1–3 months after a migration has occurred.
Product URLs are not inherently hierarchical, as a single product may appear in multiple categories. For optimal UX, the “virtual breadcrumb” URL structure should be preserved by using hierarchical URLs when navigating to products via categories and subcategories. However, product URLs should also appear at the root level (as a flat URL), and all hierarchical product URLs should be canonicalized to the flat URL, so the shorter URL appears in SERPs without creating duplicate content issues.