Firebase Hosting
Firebase Hosting provides fast and secure hosting for your web app.
Firebase Hosting is production-grade web content hosting for developers.With a single command, you can quickly deploy web apps to a global CDN (contentdelivery network).
ThoughFirebase Hosting is optimized for static andsingle-page web apps, you can alsopairFirebase Hosting withCloud Functions orCloud Run tobuild and host dynamic content and microservices on Firebase.
Key capabilities
| Serve content over a secure connection | Zero-configuration SSL is built intoFirebase Hosting, so content is always delivered securely. |
| Deliver content fast | Each file that you upload is cached on SSDs at CDN edges around the world and served as gzip or Brotli. We auto-select the best compression method for your content. No matter where your users are, the content is delivered fast. |
| Emulate and even share your changes before going live | View and test your changes on a locally hosted URL and interact with an emulated backend. Share your changes with teammates using temporary preview URLs.Hosting also provides aGitHub integration for easy iterations of your previewed content. |
| Deploy new versions with one command | Using theFirebase CLI, you can get your app up and running in seconds. Command line tools let you add deployment targets into your build process. And if you need to undo the deploy,Hosting provides one-click rollbacks. |
How does it work?
Whether you are deploying a simple app landing page or a complex Progressive WebApp (PWA),Hosting gives you the infrastructure, features, and toolingtailored to deploying and managing websites and apps.
Using theFirebase CLI, you deploy files from local directorieson your computer to ourHosting servers. Beyond serving static content, youcan useCloud Functions for Firebase orCloud Run toserve dynamic content and host microserviceson your sites. All content isserved over an SSL connection from the closest edge server on our global CDN.
You can alsoview and test your changes before going live.Using theFirebase Local Emulator Suite,you can emulate your app and backend resources at a locally hosted URL. You canalso share your changes at a temporary preview URL and set up aGitHubintegration for easy iterations duringdevelopment.
Firebase Hosting has lightweighthosting configuration options for youto build sophisticated PWAs. You caneasily rewrite URLs for client-side routing, set up custom headers, and evenserve localized content.
For serving your content, Firebase offers several domain and subdomain options:
By default, every Firebase project has subdomains at no cost on the
web.appandfirebaseapp.comdomains. These two sites serve the samedeployed content and configuration.You cancreate multiple sites if you haverelated sites and apps that serve different content but still share the sameFirebase project resources (for example if you have a blog, admin panel, andpublic app).
You canconnect your own domain name to aFirebase-hosted site.
Firebase automatically provisions SSL certificates for all your domains so thatall your content is served securely.
Implementation path
| Install theFirebase CLI | TheFirebase CLI makes it easy to set up a newHosting project, run a local development server, and deploy content. | |
| Set up a project directory | Add your static assets to a local project directory, then run In your local project directory, you can also set upCloud Functions orCloud Run for yourdynamic content and microservices. | |
| View, test, and share your changes before going live(optional) | Run To view and share your changes at a temporary preview URL, run | |
| Deploy your site | When things are looking good, run to upload the latest snapshot to our servers. If you need to undo the deploy, you can roll back with just one click in theFirebase console. | |
| Link to a Firebase Web App(optional) | By linking your site to aFirebase Web App, you can useGoogle Analytics to collect usage and behavior data for your app and useFirebase Performance Monitoring to gain insight into the performance characteristics of your app. |
Next steps
Get started withFirebase Hosting.
Continue to improve your site. Test locally, share changes at a temporarypreview URL, then deploy to your live site. Follow thisstep-by-stepguide.
Build and host microservices onFirebase.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-05 UTC.