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. www.example.com/subdirectory).
A sub-domain is a little different. They look like this: mywebsite.example.com
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).
However Google, from my experience, will treat a sub-domain as if it were separate from your main domain, and will not count myfiles.example.com as a part of your original example.com ranking.
Sub-domains are seen by search engines as separate from your main domain (e.g. myfiles.example.com does not go with www.example.com).
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. www.example.com) 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