Connecting Tech Pros Worldwide Help | Site Map

Why do web sites set up sub domains for individual cities?

Newbie
 
Join Date: Sep 2007
Posts: 2
#1: Sep 10 '07
Hi, I am going to create a site similar to craigslist.org/ ( using PHP and MYSQL on a Linux VPS) and was wounding if anyone can provide me with information on why sites like craigslist.org/ ( or the one listed below ) set up sub domains for each city. Can anyone also provide me with any suggestions on how best to set up the site structure with SEO and programming in mind.

I plan on creating a site for one city and then moving it in to a new folder for each sub domain / city on my server. Any helpful information with programming in mind on this would also help. Is this a bad idea? How best to efficiently approach this?

http://dallas.kijiji.com/

http://birmingham.gumtree.com/

http://newyork.backpage.com/

http://atlanta.craigslist.org/
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#2: Sep 11 '07

re: Why do web sites set up sub domains for individual cities?


Heya, James. Welcome to TSDN!

I'm going to go ahead and move this thread to the Apache forum, where our resident Experts will be better able to help you out.

What you're looking at is most likely mass virtual hosting, though I suppose you could use subdirectories and URL rewriting to accomplish the same thing; it is a bit of extra work to maintain all the cookies and some of the server-side variables.

One benefit to having one subdomain per city is that you can potentially split up your site between multiple servers, which helps reduce your load per server and makes it easier to keep your databases separate, etc.

There's a basic article that covers mass virtual hosting in the Apache manual.
Reply


Similar Apache Web Server bytes