Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 523839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:30:14+00:00 2026-05-13T08:30:14+00:00

There are two main strategies for handling multiple applications on the web: subdomains (e.g.

  • 0

There are two main strategies for handling multiple “applications” on the web:

  • subdomains (e.g. wiki.example.org, blog.example.org, admin.example.org, api.example.org/v1)
  • subdirs (e.g. example.org/wiki, example.org/blog, example.org/admin, example.org/api/v1)

What are the differences (advantages and disadvantages) of these two solution when dealing with web programming (e.g. in terms of code organization, browsers security models, javascript etc).

Edit: CW as there’s a correct answer, but it’s very broad.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:30:15+00:00Added an answer on May 13, 2026 at 8:30 am

    Besides the fact that from a security standpoint it is a bit easier to isolate an app within a subdomain, I will just comment on what I think is the biggest difference between the two.

    Pro’s for subdomains:

    • You can isolate configuration (for for example apache) per-domain.
    • It will be easier to migrate parts of your application to other machines. Sub-directories won’t really give you this flexibility.
    • Instead of having to use a $baseUri variable in every html template, you can just assume the root of the app is always /.

    Cons:

    • It will be much more annoying to quickly setup staging or temporary development environments. For every ‘app’ you will now need DNS of hosts-file entries and webserver configuration. With subdirectories you could drop the app in a directory, and go!
    • If you do ever have the requirement to deploy your application on a different system where using / is because of some odd policy not possible, some rewriting might be in order.

    My advice:

    Make sure you can always do both, which will give you the best of both worlds. Every part of your app should have a configurable base uri that is always respected. As long as you make sure you can always go both ways, then who cares what you do? it’s just a url and it can always be changed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I dabbled in some iPhone development and there seems to be two strategies: use
To begin, not only are there two main dialects of the language (Common Lisp
I see there are two main options for managing transactions with llblgen. Method 1:
As far as I'm aware there are two main styles of permissions systems out
I develop a certain server. Till now, two versions could not be installed at
this is a hard question. I've found nothing interesting over the web. I'm developing
I'm building a simple solid modeling application. Users need to be able to manipulate
I have a desktop (winforms) application that uses a Firebird database as a data
' Proximity ' is a strategy game of territorial domination similar to Othello, Go

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.