Alexandar Tzanov's Personal Blog

Sub-domain vs sub-directory

Lately I have been seeing the terms sub-domain and sub-directory being used interchangeably in the context of hosting, but even though the former can point to the latter, they are not the same. A sub-directory is a file storage location/association in the hierarchy of the file system. A sub-domain is an address locator, which in many cases points to a sub-directory.

For example, instead of accessing, you can create a sub-domain to point to sub-directory-z. Then you can simply navigate to But this is an oversimplification!