If you are building server-rendered Angular or Next.js apps, check out next-generation Firebase App Hosting, a full-stack solution for modern web frameworks.
פרוטוקול SSL ללא הגדרה מובנה ב-Firebase Hosting, כך שהתוכן תמיד מועבר באופן מאובטח.
העברת תוכן במהירות
כל קובץ שאתם מעלים נשמר במטמון בכונני SSD בקצוות של CDN ברחבי העולם, ומופיע כ-gzip או Brotli. אנחנו בוחרים באופן אוטומטי את שיטת הדחיסה הטובה ביותר לתוכן שלכם. לא משנה איפה המשתמשים נמצאים, התוכן מועבר במהירות.
הדמיה של השינויים ואפילו שיתוף שלהם לפני שהם עולים לאוויר
הצגה ובדיקה של השינויים בכתובת URL שמתארחת באופן מקומי, ואינטראקציה עם קצה עורפי ממולא.
אתם יכולים לשתף את השינויים עם חברי הצוות באמצעות כתובות URL זמניות לתצוגה מקדימה. בנוסף, Hosting כולל שילוב עם GitHub שמאפשר לבצע גרסאות חוזרות של התוכן שמוצג בתצוגה המקדימה בקלות.
פריסה של גרסאות חדשות באמצעות פקודה אחת
באמצעות CLI של Firebase, אפשר להפעיל את האפליקציה תוך שניות. כלי שורת הפקודה מאפשרים לכם להוסיף יעדים לפריסה לתהליך ה-build.
אם צריך לבטל את הפריסה, אפשר לבצע חזרה לאחור בלחיצה אחת באמצעות Hosting.
איך זה עובד?
בין שאתם פורסים דף נחיתה פשוט של אפליקציה ובין שאתם פורסים אפליקציה מורכבת מסוג Progressive Web App (PWA), Hosting מספק את התשתית, התכונות והכלים שמותאמים לפריסה ולניהול של אתרים ואפליקציות.
באמצעות CLI של Firebase, אפשר לפרוס קבצים מספריות מקומיות במחשב לשרתים שלנו ב-Hosting. בנוסף להצגת תוכן סטטי, אפשר להשתמש ב-Cloud Functions for Firebase או ב-Cloud Run כדי להציג תוכן דינמי ולארח מיקרו-שירותים באתרים שלכם. כל התוכן מוגש דרך חיבור SSL משרת הקצה הקרוב ביותר ב-CDN הגלובלי שלנו.
אפשר גם להציג ולבדוק את השינויים לפני שהם יפורסמו.
באמצעות Firebase Local Emulator Suite תוכלו לדמות את האפליקציה ואת המשאבים בקצה העורפי בכתובת URL שמתארחת באופן מקומי. אפשר גם לשתף את השינויים בכתובת URL זמנית לתצוגה מקדימה ולהגדיר שילוב עם GitHub כדי לבצע גרסאות אב בקלות במהלך הפיתוח.
ב-Firebase Hosting יש אפשרויות תצורה קלילות לאירוח שיעזרו לכם ליצור אפליקציות PWA מתקדמות. תוכלו לשכתב בקלות כתובות URL לצורך ניתוב מצד הלקוח, להגדיר כותרות בהתאמה אישית ואפילו להציג תוכן מותאם לשוק המקומי.
כדי להציג את התוכן שלכם, Firebase מציע כמה אפשרויות של דומיינים ודומיינים משניים:
כברירת מחדל, לכל פרויקט Firebase יש תת-דומיינים ללא עלות בדומיינים web.app ו-firebaseapp.com. שני האתרים האלה מציגים את אותו תוכן והגדרות.
אתם יכולים ליצור כמה אתרים אם יש לכם אפליקציות ואתרים קשורים שמציגים תוכן שונה, אבל עדיין משתפים את אותם משאבים בפרויקט Firebase (לדוגמה, אם יש לכם בלוג, לוח ניהול ואפליקציה ציבורית).
הצגה, בדיקה ושיתוף של השינויים לפני שהם ייכנסו לתוקף (אופציונלי)
מריצים את firebase emulators:start כדי לדמות את Hosting ואת משאבי הפרויקט בקצה העורפי בכתובת URL שמתארחת באופן מקומי.
כדי להציג ולשתף את השינויים בכתובת URL זמנית לתצוגה מקדימה, מריצים את הפקודה firebase hosting:channel:deploy כדי ליצור ולפרוס ערוץ תצוגה מקדימה. כדאי להגדיר את השילוב עם GitHub כדי לבצע בקלות גרסאות חוזרות של התוכן שמוצג בתצוגה המקדימה.
פריסה של האתר
כשהכול נראה טוב, מריצים את הפקודה firebase deploy כדי להעלות את קובץ snapshot האחרון לשרתים שלנו. אם צריך לבטל את הפריסה, אפשר לבצע חזרה לאחור בלחיצה אחת בלבד במסוף Firebase.
ממשיכים לשפר את האתר. אפשר לבדוק את השינויים באופן מקומי, לשתף אותם בכתובת URL זמנית להצגה מקדימה ולאחר מכן לפרוס אותם באתר הפעיל. פועלים לפי המדריך המפורט הזה.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-08-31 (שעון UTC)."],[],[],null,["Firebase Hosting \nplat_web \nFirebase Hosting provides fast and secure hosting for your web app. \n\nFirebase Hosting is production-grade web content hosting for developers.\nWith a single command, you can quickly deploy web apps to a global CDN (content\ndelivery network).\n\nThough Firebase Hosting is optimized for static and\nsingle-page web apps, you can also [pair Firebase Hosting with\nCloud Functions or Cloud Run](/docs/hosting/serverless-overview) to\nbuild and host dynamic content and microservices on Firebase.\n\n[Get started](/docs/hosting/quickstart)\n\nKey capabilities\n\n|-------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Serve content over a secure connection | Zero-configuration SSL is built into Firebase Hosting, so content is always delivered securely. |\n| 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. |\n| 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 a [GitHub integration](/docs/hosting/github-integration) for easy iterations of your previewed content. |\n| Deploy new versions with one command | Using the Firebase 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. |\n\nHow does it work?\n\nWhether you are deploying a simple app landing page or a complex Progressive Web\nApp (PWA), Hosting gives you the infrastructure, features, and tooling\ntailored to deploying and managing websites and apps.\n\nUsing the [Firebase CLI](/docs/cli), you deploy files from local directories\non your computer to our Hosting servers. Beyond serving static content, you\ncan use Cloud Functions for Firebase or Cloud Run to\n[serve dynamic content and host microservices](/docs/hosting/serverless-overview)\non your sites. All content is\nserved over an SSL connection from the closest edge server on our global CDN.\n\nYou can also\n[view and test your changes before going live](/docs/hosting/test-preview-deploy).\nUsing the Firebase Local Emulator Suite,\nyou can emulate your app and backend resources at a locally hosted URL. You can\nalso share your changes at a temporary preview URL and set up a [GitHub\nintegration](/docs/hosting/github-integration) for easy iterations during\ndevelopment.\n\nFirebase Hosting has lightweight\n[hosting configuration options](/docs/hosting/full-config) for you\nto build sophisticated PWAs. You can\neasily rewrite URLs for client-side routing, set up custom headers, and even\nserve localized content.\n\nFor serving your content, Firebase offers several domain and subdomain options:\n\n- By default, every Firebase project has subdomains at no cost on the\n `web.app` and `firebaseapp.com` domains. These two sites serve the same\n deployed content and configuration.\n\n- You can [create multiple sites](/docs/hosting/multisites) if you have\n related sites and apps that serve different content but still share the same\n Firebase project resources (for example if you have a blog, admin panel, and\n public app).\n\n- You can [connect your own domain name](/docs/hosting/custom-domain) to a\n Firebase-hosted site.\n\nFirebase automatically provisions SSL certificates for all your domains so that\nall your content is served securely.\n\nImplementation path\n\n|---|-------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | Install the Firebase CLI | The [Firebase CLI](/docs/cli) makes it easy to set up a new Hosting project, run a local development server, and deploy content. |\n| | Set up a project directory | Add your static assets to a local project directory, then run firebase init to connect the directory to a Firebase project. In your local project directory, you can also set up Cloud Functions or Cloud Run for your [dynamic content and microservices](/docs/hosting/serverless-overview). |\n| | View, test, and share your changes before going live *(optional)* | Run firebase emulators:start to emulate Hosting and your backend project resources at a locally hosted URL. To view and share your changes at a temporary preview URL, run firebase hosting:channel:deploy to create and deploy to a preview channel. Set up the [GitHub integration](/docs/hosting/github-integration) for easy iterations of your previewed content. |\n| | Deploy your site | When things are looking good, run firebase deploy to upload the latest snapshot to our servers. If you need to undo the deploy, you can roll back with just one click in the Firebase console. |\n| | Link to a Firebase Web App *(optional)* | By linking your site to a [Firebase Web App](/docs/web/setup), you can use [Google Analytics](/docs/analytics/get-started?platform=web) to collect usage and behavior data for your app and use [Firebase Performance Monitoring](/docs/perf-mon/get-started-web) to gain insight into the performance characteristics of your app. |\n\nNext steps\n\n- [Get started](/docs/hosting/quickstart) with Firebase Hosting.\n\n- Continue to improve your site. Test locally, share changes at a temporary\n preview URL, then deploy to your live site. Follow this [step-by-step\n guide](/docs/hosting/test-preview-deploy).\n\n- [Build and host microservices](/docs/hosting/serverless-overview) on\n Firebase."]]