0

I have a Firebase project in which I have configured static hosting. I have two domains test1.domain.com and test2.domain.com, both configured within the control panel. Each has an A record pointing to the given server IP addresses shown during configuration.

Without any configuration, browsing both domains individually serves up the index.html of the public directory.

.
├── .firebaserc
├── firebase.json
└── public
    ├── 404.html
    ├── index.html
    ├── test1.domain.com
    │   └── index.html
    └── test2.domain.com
        └── index.html

Below is example pseudocode for what I'm tying to achieve, effectively splitting the single hosting space into two. In words, any URI resource at test1.domain.com will serve the corresponding content within that sub-directory. Same applies to test2.domain.com

"rewrites": [
  {
    "source": "https://test1.domain.com/**",
    "destination": "/test1.domain.com/**"
  },
  {
    "source": "https://test2.domain.com/**",
    "destination": "/test2.domain.com/**"
  }
]

Is this possible, and if so how?

Andy Fusniak
  • 1,548
  • 1
  • 17
  • 28
  • 1
    Such virtual domain hosting is currently not possible on Firebase Hosting. All domains on a single Firebase Hosting project will serve the same content. – Frank van Puffelen May 13 '18 at 15:01
  • Possible duplicate of [Firebase hosting with multiple directories at multiple domains](https://stackoverflow.com/questions/43581735/firebase-hosting-with-multiple-directories-at-multiple-domains) – Frank van Puffelen May 13 '18 at 15:01

0 Answers0