Subdirectory vs. Subdomain
I just added some very basic forums to my site and the question came up of where to put them. I ended up going with a subdomain rather than a subdirectory and it got me to thinking.
What are the benefits and drawbacks between using subdirectories and subdomains when expanding your website?
Comments
My general rule is that if I am making a completely separate web site, for example my blog, I will give it a completely different domain or subdomain. If it is just a different page on the same site, I will use subdirectories.
One day, I encountered a host that would allow me to use subdomains as they are meant to be used. They still used a subdirectory system but, when you typed in the subdomain the URL stayed that way: "forum.hmtk.com" would take you to "www.hmtk.com/forum" but it would look like "forum.hmtk.com" to the user.
Now that I am hosting my own sites I have it even better in that the subdomains are above the "public_html" directory and I can give them their own logins/etc. This is how sites such as blogspot and wordpress do it and I like it!
If you host with godaddy it is highly likely that 100+ other sites are also on that same server. This works when all of those sites are only getting 10 or 20 hits a day. It quickly breaks down when one or more of those sites become popular!
I know of one game site (I can't remember how to spell the name) devoted to Cthulhu who were recently forced by their hosting company to move to a dedicated server. Even though they were under their allotted bandwidth they were using too much CPU time (so said the hosting company). It can really screw you up when you have a popular non-monetized website on a managed hosting server.
For years Telcos designed their networks in such a way as to only allow 10% of the people to use their phone at the same time. The idea was that most people only make short telephone calls. The rise of dial-up Internet in the 90's killed the Telcos! They had to grow their switches fast because suddenly people were spending hours on their phone line! It's the same way with the big hosting companies, they shove a ton of sites on one server expecting most to never get any meaningful traffic.
Now that I have my own server I get to look at all sorts of information. I can just leave an ssh client up and run top all day long if I want to (not that I do). I have not taken on any friend sites but I do have about 15 of my own on their right now and room for 15 more before I have to upgrade my control panel style software. I'm sure I could go in and manually edit files to allow for more domains but, is it really worth my time to do it? No. It is easier for me to spend $100 and get the unlimited domain version of the control panel software.
I currently have both. I use the control panel software because it is easy but I always have the option to open up a terminal and work that way. Both are tools and as long as you know which one to use for the job you should be fine.