Website Subdirectory vs. Subdomain: What is the Difference?

In this blog post, I am going to give a brief explanation of what sub-directories and sub-domains are in the context of websites. Which one is the best for a website? Well that is not an easy question to answer, however I’ll give my opinion (and experience) and let you make the final decision.

Simply put, a sub-directory is a directory right off a domain name (e.g.,

A sub-domain is a little different. They look like this:

First you must understand that in my experience, both sub-directories and sub-domains are not treated the same way by search engines (e.g., Google, Bing).

If I put something on, Google will see the “myfiles” part as a part of the main domain.

However Google, from my experience, will treat a sub-domain as if it were separate from your main domain, and will not count as a part of your original ranking. 

To recap:  Sub-directories are seen by search engines as a part of your main domain (e.g.,  goes with

Sub-domains are seen by search engines as separate from your main domain (e.g.,  does not go with

Do you see the difference?  So which is better for a website you ask?

Well in my opinion:

Use a sub-directory when you want to make sure that your main domain (e.g., gets more attention from search engines, and in turn, hopefully a better search engine ranking.

Use a sub-domain when you either do not care about adding value to your main website and/or when you have a website or service so different from your main website, that you want search engines to treat it as if it were separate from your main domain.

Posted in Computers, Internet and Servers