This article summarized the differences between subdomains and subdirectories.
Top Level Domain
A top-level domain is, for example, the .com part in www.website-indutries.com.
www.website-industries.com
The following are the top-level domains:
.com
Subdomain
A subdomain is any string that you can put in front of a URL.
jp.website-industries.com
In the above example, jp is the subdomain.
jp
Subdirectory
A subdirectory is the string following the slash in a top-level domain.
For example, in https://www.website-industries.com/engineer, /engineer is a subdirectory.
www.website-industries.com/engineer
/engineer
What is http or https ?
http and https refer to communication protocols.
http://
https://
http is Apache on port 80.
https is SSL on port number 443.