3 ms·
Ask HN: How should I setup the domain name architecture of my web app?
So I have the marketing site URL, but once someone signs up - and starts using the app - they won't be on the marketing site anymore, rather the actual app itself.
Basecamp has a variety of domains that you can choose to make your name from. Campaign monitor has createsend.com, where you get <your company>.createsend.com.
Kevin Hale (of Wufoo fame) has said that if he could go back he would not do subdomains in a web app again - http://particletree.com/notebook/subdomains-development-sucks/
Do ou guys have any feedback as to what I should do, and how I should separate my marketing site from the actual app itself?
Also just some general thoughts/tips/best practices?
The web app is written in rails.
- delano 16y agoYou have only two other options: * use one domain for your marketing site and another for the app (not desirable) * incorporate your marketing site into your rails app. BTW, thanks for the Particletree link. I hadn't read that.
- marcamillion 16y agoWell....I guess the real question should have been, what are the options and the related pros and cons. I know I said I don't want the app to be on the same domain as the marketing site...but that's based on my limited knowledge. What are the pros & cons (both technical and non-technical) that I should consider with this option - and all other options. Thanks.
- bobbywilson0 16y agoI think the thing to consider is what is most practical to your users. I want to be able to login at yourdomain.com I don't want to remember that I have to login at app.yourdomain.com. I think ultimately providing the simplest path for your users to sign up and log in with is what you should do. What might make the most sense is putting your marketing site in a sub-directory like /tour or something and then get another domain just for marketing that redirects you to the /tour marketing page.
- marcamillion 16y agoThis is an interesting solution. So the actual app could be at my main marketing domain - perhaps just simply have the marketing site appear when they are not logged in. Once they are logged in, they are shown their home screen. But how do I handle the file organization for each user. Give them their own subdomain or just do folders? So all the images for marcamillion would be mydomain.com/marcamillion/images, and my home site would be mydomain.com/marcamillion.
- bobbywilson0 16y agoYeah, the style you mentioned (domain.com/user/images) makes sense to me, and it is built into Rails to do it that way.
- bobbywilson0 16y agoI don't think your problem is as complex as you think. You have two sites right, a marketing site and an application. If it is just this I would keep both sites under the same domain and deploy your application to a sensible sub-directory. Alternatively you can make a sub-domain for the app, but this is just slightly more work since you will have to take care of this in your DNS settings. However, if you are planning on giving your users each sub-domains then you are talking about something way more involved. Clarify your question, and I think you will get better help.
- marcamillion 16y agoIf I deploy the app to a sub-directory, or a sub-domain, what do I do with the users? mysite.com/marcamillion ?, where marcamillion is a sub-folder of root ?
- bherms 16y agoIncorporate your site into the app. Generate a "site" controller and then populate the views for your main page with the site. Use the controller if you want anything to be dynamic. Then set your routes so that the root is site/index. "map.root :action => 'index', :controller => 'site'" etc. Then you can use the rails app as a sort of CMS while maintaining the domain.