They can happen at multiple levels of the hierarchy
- com, example.com, foo.example.com are all domains
- com is a TLD
- subdomain is a relative term, not an absolute one:
. example.com is a subdomain of com
. foo.example.com is a subdomain of example.com
. bar.foo.example.com is a subdomain of foo.example.comIf somebody asked me what domain you’re using and you said “com”, you would technically have answered accurately but they’d be confused.