> Documentation index: https://firebase.google.com/docs/hosting/llms.txt

A Firebase project's **default Firebase Hosting site** is the primary
Hosting site for the project.

It's associated with the following two Firebase-provisioned default subdomains:

- `DEFAULT_SITE_ID.web.app`
- `DEFAULT_SITE_ID.firebaseapp.com`.

These subdomains serve the web app content that you deploy to
Firebase Hosting and have access to all of the Firebase project's resources
(such as databases, storage, and authentication).

Your project's default Hosting site is also used by other Firebase tools and
services, for example:

- It serves as the default target for Firebase CLI deployments (unless you configure [deploy targets](https://firebase.google.com/docs/cli/targets.md.txt)).
- Its `*.firebaseapp.com` subdomain is used as the default `authDomain` in your Firebase Web App configuration for Firebase Authentication flows (such as Google Sign-In).

On this page, learn more about the default Hosting site:

- [Create a default Hosting site](https://firebase.google.com/docs/hosting/default-site.md.txt#create-default-site)
- [Find the default Hosting site domain](https://firebase.google.com/docs/hosting/default-site.md.txt#find-default-site-domain)
- [Determine the site ID for the default Hosting site](https://firebase.google.com/docs/hosting/default-site.md.txt#determine-site-id)
- [FAQ and troubleshooting](https://firebase.google.com/docs/hosting/default-site.md.txt#faq-and-troubleshooting)
- [Changes for deferred creation of the default Hosting site](https://firebase.google.com/docs/hosting/default-site.md.txt#deferred-default-site)

## Create a default Hosting site

The way that your default Hosting site is created depends on when you
created your Firebase project.

### Before October 15, 2026

If you created your Firebase project or added Firebase to an existing
Google Cloud project **before** October 15, 2026, then your project's
default Hosting site was automatically created for you at that time.

### After October 15, 2026

If you created your Firebase project or added Firebase to an existing
Google Cloud project **after** October 15, 2026, then your project's
default Hosting site is created on demand.

**The first Hosting site created in your Firebase project always becomes
your default Hosting site.**

If your Firebase project does not yet have a default Hosting site and you do
any of the following ***for the first time*** in your Firebase project, a
default Hosting site will be created.

#### Explicitly create the default Hosting site

When you do any of the following, Firebase creates the default Hosting site
with the requested site ID:

- CLI: Run `firebase hosting:sites:create SITE_ID`
- REST: Call [`projects.sites.create`](https://firebase.google.com/docs/reference/hosting/rest/v1beta1/projects.sites/create.md.txt)

> [!IMPORTANT]
> **Important:** Whenever possible, try to create the default Hosting site ***before*** creating your Firebase Web App in your Firebase project. This order ensures that your Firebase configuration is populated with the `authDomain` value, which is by default the domain of your default Hosting site.

#### Implicitly create the default Hosting site

- When you do any of the following, Firebase asks you to create the default
  Hosting site yourself (or asks for a preferred site ID to create the site
  for you):

  - Console: Create a Firebase Web App using the Firebase console "add app" workflow
  - CLI: Run `firebase init hosting`
  - CLI: Run `firebase init` and select hosting
  - CLI: Run `firebase init auth`
  - CLI: Run `firebase init` and select authentication
  - CLI: Run `firebase deploy --only hosting`
  - CLI: Run `firebase deploy` with `hosting` configured in your `firebase.json`
  - CLI: Run `firebase apps:create web`
- When you do any of the following, Firebase *automatically* creates the default
  Hosting site for you in the background (and does *not* ask for a preferred
  site ID) for any of the following Firebase Authentication related scenarios:

  - Console: Enable Firebase Authentication
  - Enable the `identitytoolkit.googleapis.com` API via the gcloud CLI, REST, Terraform, etc.

> [!IMPORTANT]
> **Important:** Calling the [`projects.webApps.create` endpoint](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps/create.md.txt) does ***not*** create the default Hosting site and does ***not*** prompt you to create a default Hosting site. You need to separately create the default Hosting site (for example, by calling [`projects.sites.create`](https://firebase.google.com/docs/reference/hosting/rest/v1beta1/projects.sites/create.md.txt)). We strongly recommend that you **create the default Hosting site
> *before* creating the Firebase Web App**.

> [!WARNING]
> **Warning:** Be aware that if your project ID has not yet been used to create a site ID (either in your project or in a different project), then any project can create a site with that ID, including a project that you don't control ([learn more](https://firebase.google.com/docs/hosting/default-site.md.txt#not-using-project-id)). If you choose not to use your project ID as the site ID for your default Hosting site, then you might consider [creating an additional site](https://firebase.google.com/docs/hosting/multisites.md.txt) in your Firebase project that uses your project ID to ensure that your project ID is used by your project and not someone else's.

## Find the default Hosting site domain

> [!IMPORTANT]
> **Important:** Starting October 15, 2026, Firebase no longer creates a default Firebase Hosting site when you create a Firebase project or add Firebase to an existing Google Cloud project. Learn more about the [changes for deferred creation of the default Hosting site](https://firebase.google.com/docs/hosting/default-site.md.txt#deferred-default-site).

You can find your project's default Hosting site domain in the Firebase
configuration for your Firebase Web App (the `authDomain` field) or by directly
querying Firebase Hosting for the default site. If there is no `authDomain`
field or `DEFAULT_SITE` site, learn about
[creating a default Hosting site](https://firebase.google.com/docs/hosting/default-site.md.txt#create-default-site).

- **Firebase console (Project settings)**:

  1. In the Firebase console, go to the **Settings** \> [**General** tab](https://console.firebase.google.com/project/_/settings/general?useAutoProject=true).
  2. In the **Your apps** card, select any Firebase Web App.
  3. Select **Config** to view the app's Firebase configuration.
  4. The domain for your default Hosting site is listed in the `authDomain` field.
- **Firebase CLI**:

  1. From any directory, run the following command with your project ID:

     ```
     firebase apps:sdkconfig web --project PROJECT_ID
     ```

     <br />

  2. If prompted, select any Firebase Web App to print the app's Firebase
     configuration.

  3. The domain for your default Hosting site is listed in the
     `authDomain` field.

- **Hosting REST API**:

  1. Call the [`projects.sites.list` endpoint](https://firebase.google.com/docs/reference/hosting/rest/v1beta1/projects.sites/list.md.txt) with your project ID.
  2. Your default Hosting site is labeled as `"type": "DEFAULT_SITE"` and its domain is in the `defaultUrl` field.
- **Your web app's codebase**:

  > [!NOTE]
  > **Note:** Because this value could have been manually modified, this config *in your codebase* isn't the most reliable way to find this value.

  In a web app that's set up to use Firebase, you can find your project's
  default Hosting site in your
  [Firebase configuration](https://firebase.google.com/docs/web/learn-more.md.txt#config-object) in the
  `authDomain` field.

## Determine the site ID for the default Hosting site

After October 15, 2026, here's how the site ID for the default
Hosting site will be determined:

- If you create the default Hosting site yourself (or you're asked for a
  preferred site ID), then you can use any available site ID. We recommend
  trying to use your project ID.

- If Firebase *automatically* creates the default Hosting site for you
  without asking for a preferred site ID, then we'll try to use the project ID
  as the site ID. However, if that value is already taken, then we'll append 5
  random characters to the project ID.

  Note that this was the way that Firebase created the
  default Hosting site ID before October 15, 2026.

Learn more about the situation where
[your default Hosting site does not use your project ID](https://firebase.google.com/docs/hosting/default-site.md.txt#not-using-project-id).

## FAQ and troubleshooting

The following are answers to frequently asked questions (FAQs) and
troubleshooting information about the default Hosting site.

### Cannot change or delete the default Hosting site

After the default Hosting site is created for your project, you can't
change it or delete it.

If you want a site with a different site ID and Firebase-provisioned subdomains
(`SITE_ID.firebaseapp.com` and
`SITE_ID.web.app`), then you can create an
*additional* site using the [multisites feature](https://firebase.google.com/docs/hosting/multisites.md.txt) of
Firebase Hosting.

### Default Hosting site not using project ID

> [!IMPORTANT]
> **Important:** Starting October 15, 2026, Firebase no longer creates a default Firebase Hosting site when you create a Firebase project or add Firebase to an existing Google Cloud project. Learn more about the [changes for deferred creation of the default Hosting site](https://firebase.google.com/docs/hosting/default-site.md.txt#deferred-default-site).

When Firebase *automatically* creates your project's default Hosting site
(and does *not* ask for your preferred site ID), we try to use your project ID
for the site ID.

However, because Firebase has no way to anticipate and thus reserve all the
possible project IDs that might be created one day, **someone else might have
already created a site in *their* project that uses your project ID as a site
ID** . This situation can happen if your project ID is something relatively
common or popular. For example, if your project ID is something like
`logs-dashboard`, then someone very likely already used that ID as one of their
site IDs.

In this situation, we can't use your project ID for your project's default
Hosting site. Instead, we append 5 random characters to your project ID for
your default Hosting site.

> [!NOTE]
> **Note:** Before October 15, 2026, this situation was only due to the [multisites feature](https://firebase.google.com/docs/hosting/multisites.md.txt) for Firebase Hosting. After October 15, 2026, this situation is due to the multisites feature as well as Firebase starting to allow a preferred site ID for the default Hosting site.

### Error about not having a default Hosting site

To fix this kind of error, you need to
[create a default Hosting site](https://firebase.google.com/docs/hosting/default-site.md.txt#create-default-site) for your Firebase
project.

#### Details of why you might get this error

Starting October 15, 2026, Firebase no longer creates a default
Firebase Hosting site when you create a Firebase project or add Firebase to
an existing Google Cloud project.

Instead, Firebase only creates the default Hosting site in the following
scenarios:

- *(Explicitly)* If the default Hosting site is explicitly created (for
  example, by calling the `projects.sites.create` endpoint).

- *(Implicitly)* If an action taken on the Firebase project might require a
  default Hosting site (for example, by clicking through the
  Firebase Hosting get started flow in the Firebase console or enabling
  Firebase Authentication).

To accommodate this change, if your Firebase project doesn't yet have a default
Hosting site, Firebase will almost always prompt you to create one:

- In most situations, Firebase asks for your preferred site ID and then automatically creates the default Hosting site for you.
- In a few situations, Firebase asks you to create the default Hosting site yourself and provides you with options to do that (for example, by running a CLI command).

Unfortunately, in some situations, we can't accommodate this change and you may
get a generic error about not having a default Hosting site. To fix this
kind of generic error, use one of the options described in
[creating a default Hosting site](https://firebase.google.com/docs/hosting/default-site.md.txt#create-default-site).

<br />

*** ** * ** ***

## Changes for deferred creation of the default Hosting site

This section describes the changes for the deferred creation of a
Firebase project's default Firebase Hosting site. These changes take effect
starting October 15, 2026.

- The default Hosting site is ***not created*** when a new Firebase project
  is created or Firebase is added to an existing Google Cloud project.

- Firebase only creates the default Hosting site in the following scenarios:

  - *(Explicitly)* If the default Hosting site is explicitly created (for
    example, by calling the `projects.sites.create` endpoint).

  - *(Implicitly)* If an action taken on the Firebase project might require a
    default Hosting site (for example, by clicking through the
    Firebase Hosting get started flow in the Firebase console or enabling
    Firebase Authentication).

With these changes, here are some important topics to understand:

- [How to create the default Hosting site.](https://firebase.google.com/docs/hosting/default-site.md.txt#create-default-site)

- [How to determine the site ID for the default Hosting site.](https://firebase.google.com/docs/hosting/default-site.md.txt#determine-site-id)