Articles

How to Set the Default App

What Is the Default App?

The default app (sometimes called the default site) is the app that will be used for any web requests that use the server's IP address (e.g., http://1.2.3.4) or a domain name that doesn't belong to any of the apps on the server.

Which App Is the Default?

The default app is the app whose name is alphabetically first.

If you have two apps on your server, foo and bar, then the app bar will be the default because bar comes alphabetically before foo.

How to Create a Default App

If you want to create an app that is always the default, create an app named 0default (a zero followed by the word default). As long as none of your other apps start with a zero, this app will be the default.

How to Make a Specific App the Default

If you need to make a specific app the default, you should still create an app named 0default as described above. After creating the app, create a .htaccess file in the 0default app's web root directory with the following contents:

RewriteRule .* http://example.com [R=302,L]