Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Doug Hawkinson
Full Stack JavaScript Techdegree Student 25,073 PointsHow to set up hosting accounts for real commercial sites
This is probably a bit odd to ask here but it goes to how I need to set up hosting accounts for my first actual commercial websites that will be the outgrowth of my FSJS Techdegree training. This is not a tax question but a hosting site setup question.
My wife and I have an umbrella corporation for tax purposes. Under the corp. umbrella we have two DBAs that we conduct business out of. One is her business (Office Furniture Design), the other is my new (Website Design/Web development freelance) business. There may be two other DBA businesses that follow as well. Our current hosting agreement for the Office Furniture Design business has expired (so I will now be rewriting that site - long story, won't bore you). This now today! Our email access expired with that hosting agreement so time is of the essence for reestablishing email (even before the site goes live again). I own all the domains involved. I have established a new hosting agreement that will allow me to run up to 300 websites (no way, Jose). I'm only going to need (max) 4.
Now that you have the context, here is the question. Hierarchically, how do I set the Accounts? We don't want to pay for full email services on all the DBA sites. The plan is to alias DBA email addresses to the actual email addresses, enabled at the corp umbrella level, and have the commercial websites running at the DBA level. I think I understand how to setup email forwarding addresses at the DBA level that point up the the Corp umbrella level. What I don't get is how the HTML, CSS, JS and Databases fit into the scheme.
I was advised to setup addon accounts by the hosting site Customer Support folks (located in Mumbai or somewhere else in India). That is not a cultural slam, it is a logistical/communication concern. I set up the addon accounts then looked a the file tree structure on the Cpanel. The Corp site is the root level and all the DBA site reside in a folder under that root level named public_html. I can create individual css, js, and image folders by website, but it looks like all the html is expected to be in public_html. I can deal with that concept by having secondary page html creatively named. But, I don't know how to deal with the two critical questions of: 1. How do the search engines know to pickup the index.html at the DBA level and not the Corp umbrella level. 2. If all html is in the public_html folder and I can't have duplicate name and the search engine is looking for an index.html file, how does the need for multiple index.html files get solved.
I told you it was an odd question. I want to setup the architecture correctly from the beginning to minimize back pedalling and massive rework in the future. Plus, I need to get email reestablished Today if possible. The websites need to follow soon after and I think that will be doable as soon as I understand the architecture. I am willing to go with three or more Cpanel hosting sites, if that is the correct answer.
HELP!!!
3 Answers
Gold Yon War
Courses Plus Student 9,590 PointsGreg Kaleka
39,021 PointsHi Doug,
It sounds like you are conflating some things. My first question: where do you have your hosting? Are you on a shared host?
Search engines don't care about your server folder structure. It sounds like the hosting service will be creating virtual hosts in order to support multiple domains. What this effectively means is that your folder structure will be something like this:
/var/www/Site1/public_html/index.html
/var/www/Site2/public_html/index.html
/var/www/Site3/public_html/index.html
<-- and so on -->
Search engines will find your site based on the domain name - they have no access to the underlying folder structure, so you really don't need to worry about it. Typically, all of this is abstracted away from you as well (along with the email issue), so you just have to worry about keeping your email and web files aligned by domain.
Again, this is all assuming you are using a rather typical shared hosting service. I may give you some different feedback if your host is weird :).
Cheers,
-Greg
Doug Hawkinson
Full Stack JavaScript Techdegree Student 25,073 PointsGreg:
I am not sure how to answer your question. I am enough of a rookie that I am not sure what you mean by shared host. I am hosting (now) with ehost.com. We moved the Office Furniture hosting from GoDaddy.com. Sad story.
When we had GoDaddy develop the site over a year ago we were specific that we wanted them to do the initial development but that as soon as I came up to speed with html, css, js, etc. that I would take over maintenance and development of the site. Their answer was you will be able to do that. When I decided to take a look at their file structure yesterday because I felt I was competent to understand what they had done, I found no files in their maintenance area. I called customer support to find out where they were and that is when I found out there are no files. They have a tool they provide (with limited capabilities) that I can use to maintain the site. (Big lesson learned there). Needless to say, I said I am not continuing to pay your exhorbitant fees and not have a tangible product that I can get my hands on. They said OK and turned off the website and along with it the email. I say it was a bait and switch, they do not agree. So here I stand, hat in hand, needing to move quickly. Ah, well if life was easy it wouldn't be worth living, I suppose. Enough of that.
I looked at the file structure on ehosts and it looks like this:
(root) ergobizsolutions.com (Corp level) (folder) .cpanel (folder) .cphorde (folder) etc. (folder) mail (mail addresses and probably aliases go up here) (folder) public_html (folder) cgi_bin (folder) ergobizdesign.com (DBA level) (folder) cgi_bin (folder) fivesolasdesign.com (DBA level) (folder) cgi_bin
What I think you are telling me is this (I'll use ergobizdesign.com as the example)
The structure stays intact and is completed like this: (folder) public_html (folder) cgi_bin (folder) ergobizdesign.com (folder) cgi_bin (folder) css (file) styles.css (folder) js (file) behavior.js (folder) img (file) image1.jpg (file) image2.svg (file) etc. (file) index.html (file) about.html (file) contact.html (file) etc.html
And then fivesolasdesign.com would follow the same pattern as erobizdesign.com. And the hosting site and search engines work the logistics out. Am I right?
I am sorry to be so verbose. But, I want to get this right the first time if possible.
Greg Kaleka
39,021 PointsHere's how my web server folder structure is set up:
- var
- www
- gregkaleka.com commutepop.com
<!-- and now going into gregkaleka.com -->
- gregkaleka.com
- public_html vendor
<!-- going into public_html -->
- public_html
- index.php css img portfolio contact errors inc
Simplified, but you get the picture. So when I am connecting via ssh or sftp, I'm moving files for each respective website into its own folder hierarchy.
As for email, since I'm managing a VPS on my own, it's a bit different, but when I was on a shared host (Dreamhost), email was entirely managed in the admin panel via menus and buttons. Nothing relating to folders, etc. Even on VPS, I'm not manually managing email records.
Doug Hawkinson
Full Stack JavaScript Techdegree Student 25,073 PointsI can't find the best answer button. But Greg's answer is it
Greg Kaleka
39,021 PointsNo best answers in General Discussion topics - glad I was able to help you, though!
Doug Hawkinson
Full Stack JavaScript Techdegree Student 25,073 PointsDoug Hawkinson
Full Stack JavaScript Techdegree Student 25,073 PointsThanks Gold. That is good information, but it didn't really address the architecture issue. I will look at other pages on that site to see if they address it.