Every website used to be like “www.example.com”. Now I rarely encounter this “www.”. Why did it even exist and where has it gone? I also used to run into websites with legitimate domains, but “ww1.” instead of “www.”, these were probably phishing sites, but how did this actually work on top of legitimate domains?


Okay. ftp://, http://, https:// are associate with protocols that operate on a common port. You can execute “cat /etc/protocol” (on macOS or Linux terminal) and see each associate common port and their protocol name.
The protocol is associated with a port that is open on a host, which is associated with a process in the OS and that process listens and “talks” those ways when a host connects with a client, like a web browser.