/    Sign up×
Community /Pin to ProfileBookmark

Hostname versus virtual folder naming conventions

I am trying to understand the differences between the following ways of naming a web site:

foo.somedomain.com

versus

www.somedomain.com/foo

Are there advantages or disadvantages in choosing one over the other?

Any enlightment and assistance would be greatly appreciated.

Thank you in advance.

to post a comment
Full-stack Developer

8 Comments(s)

Copy linkTweet thisAlerts:
@MstrBobAug 26.2004 — The differences? In the first one, foo is a subdomain. Sometimes hosting companies will charge you for them, or limit the number of them that you have. The second one is a directory. No host (worth using) will limit/charge for directories.

Edit: type, :p
Copy linkTweet thisAlerts:
@Paul_JrAug 26.2004 — [i]Originally posted by MstrBob [/i]

[B]In the first one, foo is a subdirectory.[/B][/QUOTE]

Are you sure? I could've sworn it was [i]subdomain[/i].
Copy linkTweet thisAlerts:
@MstrBobAug 26.2004 — This is what happens when I type fast :p Where'd I get subdirectory from? ? :rolleyes: :p
Copy linkTweet thisAlerts:
@Paul_JrAug 26.2004 — [i]Originally posted by MstrBob [/i]

[B]This is what happens when I type fast :p Where'd I get subdirectory from? ? :rolleyes: :p [/B][/QUOTE]

Heh. That's why you have to proof-read your posts before you hit that “Submit” button!
Copy linkTweet thisAlerts:
@MstrBobAug 26.2004 — And take the extra 2.5 seconds to spellcheck? Pfft. Who needs that?
Copy linkTweet thisAlerts:
@ray326Aug 26.2004 — To the servers it can make a big difference in your architectural choices but in practice there's little difference.
Copy linkTweet thisAlerts:
@AlexBeeauthorAug 27.2004 — Thank you for those that responded to my question...

Could anyone elaborate more on the benefits the naming convention of:

foo.somedomain.com (subdomain)

... has for servers and architechtural choices as mentioned by ray326 over the naming convention ...

www.somedomain.com/foo (subdirectory)

...?
Copy linkTweet thisAlerts:
@ray326Aug 28.2004 — This is just stream of conciousness stuff here.

Some web servers like Apache can create "virtual hosts" that run on the same box with a single IP address but respond as distinct web servers based on the "hostname" in the request. So at address 123.344.321.11 you could have foo.domain.com and bar.domain.com. Most non-geek users think about function in this way. They'd go search.comp.com or home.comp.com and if this is internal it allows them to simply type search or home or benefits or timecard into the location bar. These various sites and applications can then be deployed in virtual hosts on one box or distributed across several boxes as needed.
×

Success!

Help @AlexBee spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...