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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamess
    New Member
    • Sep 2007
    • 2

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

    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?


    Last edited by Niheel; Aug 1 '18, 11:16 PM.
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    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.

    Comment

    Working...