Joctan Garcia
Joctan Garcia

Reputation: 25

How configure different subdomains on firebase hosting for to serve different content by each subdomain?

Can i create different subdomains from Google Domains, register them on Firebase Hosting and serve different content by from each one subdomains?

If the answer is yes, how? I followed this guide: https://medium.com/@fransandi/use-firebase-multisite-hosting-to-associate-multiple-domains-subdomains-to-your-project-ee099109bfe9 and although its title says "multiple domains/subdomains", it didn't help me for deployed content on my subdomains. Always got this error: "Error: HTTP Error: 404, Requested entity was not found" when run "firebase deploy --only hosting:my-target". Deploy in my main domain easy, but for subdomains... I can't.

Upvotes: 2

Views: 1243

Answers (1)

wbhill13
wbhill13

Reputation: 75

Create a separate folder for each site/app, and then deploy hosting for each site/app. When you click the "add custom domain" button, type in the subdomain that you want to use. Example

mysubdomain.mydomain.com

When you add the 2 A records to your domain registrar make the host name your subdomain instead of @ or www.

Upvotes: 1

Related Questions