#
Setting up Firebase Hosting with an is-a.dev Subdomain
This guide will walk you through the process of setting up a Firebase Hosting site and pointing your is-a.dev subdomain towards it.
#
Creating a Firebase Project
First, create a Firebase project and set up Firebase Hosting. Follow the instructions in the Firebase Hosting Documentation.
#
Setting up Firebase Hosting
- Install the Firebase CLI:
npm install -g firebase-tools - Initialize Firebase in your project directory:
firebase init hosting - Deploy your site:
firebase deploy
#
Creating the Domain File
Create a JSON file inside the domains directory (domains/subdomain.json) with the following content and submit a pull request:
{
"owner": {
"username": "github-username",
"email": "me@example.com"
},
"records": {
"CNAME": "your-firebase-site.web.app"
}
}
Make sure to replace:
github-usernamewith your actual GitHub usernameme@example.comwith your email addressyour-firebase-site.web.appwith your hosting site
#
Configuring Firebase Hosting for Custom Domain
After your pull request is merged and your is-a.dev subdomain is active:
- Go to your Firebase Console
- Navigate to Hosting in the left sidebar
- Click Add custom domain
- Enter your is-a.dev subdomain (e.g.,
example.is-a.dev) - Firebase will verify domain ownership automatically through DNS
- Wait for the SSL certificate to be provisioned (this can take up to 24 hours)
#
Notes
- Firebase Hosting automatically provides SSL certificates for custom domains
- Make sure your Firebase project is deployed and accessible before adding the custom domain
#
Troubleshooting
If you encounter issues:
- Ensure your Firebase project is deployed and accessible via the default
.web.appdomain - Check that your DNS records have propagated (this can take up to 48 hours)
- Verify your Firebase Hosting configuration in
firebase.json - Make sure your build files are in the correct public directory specified in your Firebase configuration