• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
Firefox Marketplace
  1. MDN
  2. Mozilla
  3. Firefox Marketplace
  4. Publishing
  5. Adding a subdomain for an app

Adding a subdomain for an app

In This Article
  1. Generic instructions for adding a subdomain
  2. Adding a subdomain with cPanel
  3. Adding a subdomain with Go Daddy

On older versions of Gecko (Firefox OS 2.1, Firefox Desktop/Android 34) you can only have one app per origin. One around this is to use a subdomain for each app. Each subdomain is a different origin, for example app1.example.com, app2.example.com. Creating a subdomain is usually easy to do, and it is free with most domain hosting providers. Typically the hosting provider allows a certain number of free subdomains. Some examples of adding subdomains are given below.

Generic instructions for adding a subdomain

  1. Log in to your hosting provider's administrative console for your domain.
  2. Find the page that deals with configuring domains.
  3. Locate the capability to add a subdomain.
  4. Add the subdomain, specify where the subdomain's files will be stored, and save your changes.
  5. Put your app's files on the server where you specified in step 4.
  6. Verify that the new subdomain exists by going to it in a browser.

The following sections explain how to add a subdomain with specific hosting tools.

Adding a subdomain with cPanel

Here is an example of creating a subdomain with cPanel, which is a web hosting control panel that is used by many hosting providers.  Your cPanel page might look different, depending on how it has been configured, but this should give you an idea.

  1. Log into cPanel.
  2. Scroll down and find the Domains section.

  3. Click Subdomains to open the Subdomains page.

  4. Type the subdomain name in the Subdomain box. For this example we will use "newsubdomain".
  5. Click in the Document Root box. This displays the path where the files for the new subdomain will be stored. In this example we will use /public_html/newsubdomain. You can change this if you want your app's files in another location. For example, if the files for your app are in public_html/gamedev_com/games/coolgame/, then type that path in the Document Root box.Document root
  6. Click the Create button and you should get a confirmation message.
  7. Put your app's files in the directory that you specified for the subdomain. For this example we will use a simple HTML file named index.html that displays "This is on a new subdomain!"
  8. Confirm that the new subdomain exists. Open a browser and type in the new domain name. In this example the following appears:

    New subdomain in browser

Adding a subdomain with Go Daddy

Here is a video of how to add a subdomain to a domain hosted by Go Daddy.

 

Document Tags and Contributors

Tags: 
  • Apps
 Contributors to this page: chrisdavidmills, Sheppy, markg
 Last updated by: chrisdavidmills, Jan 7, 2015, 11:11:22 AM
  1. Prepare for success
    1. Introduction
    2. Deciding what to build
    3. Getting to know your users
    4. Choosing your business model
    5. Localizing your apps
    6. Promoting your app
    7. Creating your community
  2. Your publication options
    1. Introduction
    2. Packaged apps
    3. Hosted apps
    4. Packaged or hosted?
    5. Mobile-optimized websites
    6. Publish apps yourself
  3. App publishing overview
    1. Introduction
    2. Submission checklist
    3. Marketplace review criteria
    4. Marketplace showcase criteria
    5. Adding a subdomain for an app
    6. Policies and Guidelines
      1. Introduction
      2. Marketplace screenshot criteria
      3. Privacy policy
      4. App testing and troubleshooting
  4. Submit your app
    1. Overview
    2. Step 1: Sign-in
    3. Step 2: Load app
    4. Step 3: Listing details
    5. Step 4: Next steps
    6. Step 5: App rating
    7. Step 6: Define team members
    8. Step 7: View listing
    9. Step 8: Edit other localizations
  5. Managing and updating published apps
    1. Introduction
    2. Your app's status
    3. Updating apps
    4. App Stats
  6. Add-on submission
    1. Add-on submission overview
    2. Add-on review criteria
  7. Libraries and APIs
  8. Firefox Marketplace FAQ