
Ask HN: Subdomains vs Directories for Account has many Users - clyfe
I am making an app where several user work towards a common goal grouped under an account. What would be a better structure for my urls?<p>* Subdomains: some-team-name.app.com<p>* Directories: app.com/some-team-name
======
jacquesm
I've used subdomains for years (the '@' above should be a '.' I believe') and
have recently switched them all over to path names.

Subdomains were all 'hot' 10 years ago, but these days people seem to be
comfortable with having a path in the url.

Subdomains look a bit more consistent (going from the 'small' to the 'large',
user domain tld) than pathnames but that's personal preference on my part.

If you are going to use Google Analytics then you'll be pleased to know that
if you use path names that Google will not get confused when counting uniques
(using subdomains there is a lot of double counting).

------
rykov
Pros/cons to consider in a few contexts:

* Custom domains - if you ever want to allow custom domains (ala Tumblr, Posterous, etc), it's probably easier to go w/ subdomains. The URL recognition will be much easier.

* Security - if you ever want to allow custom HTML/Javascript, I would say that custom domains are a must for security reasons. However, passing login credentials across multiple domains might be trickier than using a single domain.

* SEO - I'm not completely sure, but very curious to know. Can someone chime in on SEO tradeoffs of these two options?

------
stympy
Be aware there can be a cost difference if you want to provide SSL to your
users. A wildcard SSL cert to cover *.app.com will cost you $200/year, whereas
a standard SSL cert to cover just app.com will cost you $20/year.

I personally prefer subdomains, but I agree that people are generally
comfortable with whatever approach you take.

