Subdomains come before the URL while subfolders come after. Subdomains are treated as a completely different site from the primary URL while subfolders are simply new pages on the main domain.