Domains, Subdomains, and Folders: Which is better for Indexing?


I have a domain:

I understand that a subpage would be:

and that a page within a folder within the domain would be: (or .html).

Two questions are:

  1. Is it better to list the pages under their own folder as above, or is it okay to list them directly in the root directory at my server as in:

  1. If I list them inside their own folder, what does that do to getting them indexed? i.e. Is there a limit to how many levels down indexing can go?


It’s better not to put pages too deep in a folder structure, but placing all your pages in the root folder (e.g. mydomain/page-n.php) will also make the site quite hard to manage, and is unlikely to help indexing or page rank (so far as I know). Let the nature and natural ordering of you site content guide you in organizing it appropriately.

I recall that SEOmoz had one or more articles about optimised directory structure recently, particularly one about what can happen when structures are too deep and/or not effectively interlinked. Sorry that I don’t have any more specific links, though.

(This should be in the SEO section, shouldn’t it?)

First, don’t get confused between the structure of your site and the structure of your navigation - the two can be completely independent. You could have a series of folders going 4 deep, but a single flat navigation list, or vice versa.

It depends on how big your site is likely to become (better to put structures in place now, even if you don’t need them yet, because if you need them a couple of years down the line, you’ll wish you’d done it sooner), and how easily classified the pages are. I would almost always use sub-folders to group pages together; it just makes the site easier to manage.

There is something to be said for having consistency between site structure and navigation, as well. For example, if a page is located on the ‘electronics’ submenu under the ‘products’ menu, it would make sense if it was in the folder … that makes it easier for you to manage the site and can also help search engines to make sense of it.

In terms of how far they will index … again, this is more a feature of your navigation than your folder structure. Spiders prefer pages that you can get to within about three clicks from the home page - that isn’t to say they won’t index others, but it will take them longer to find those pages and they’re likely to consider them as less important. But no, having your files stored in one or even two levels of subfolders won’t hurt your search rankings.

I understand that a subpage would be:

Subdomain. Which, for me, would mean more work in Apache when I’m trying to mod_rewrite URLs.

Because these are two entirely different places:

Spiders prefer pages that you can get to within about three clicks from the home page

They do? I’m curious, especially seeing they may never reach the home page in the first place. link?

OK, perhaps it would be better to say that they prefer pages they can get to in a few clicks from the page they land at/choose to start spidering from. In many cases, this will be the home page, because that’s usually the one with the most links to it, both internal and external.