I have my own domain i.e www.example.com, and I just connected with Firebase Hosting, however what I want is to deploy a website (using Flutter) for that domain and a different one with the following path: www.example.com/other, as you can see the /other should direct to another website that I have, is that possible throw Firebase Hosting? or do I need to have two domains one for each website
Firebase Hosting only deploys a single site in its entirety, using all of the content in a single folder, usually called "public" in your project. It doesn't really do partial updates scoped to a specific path.
You can certainly deploy multiple apps to one site. You will just have to make sure all of their content is added to that public folder for deployment as a unit. If you don't want to do that, you can certainly manage each site independently with a different hostname for each.
Related
I had a main domain example.com hosted somewhere else. I had created two subdomains of it app.example.com and link.example.com and successfully mapped these to firebase hosting. Before I deployed firebase hosting those work perfectly for dynamic links.
But after my first deployment those are not working and showing this error
https://link.example.com is not connected properly
Your Dynamic Links path prefix is not configured in firebase.json. Check your firebase.json configuration and try again.
I want my link.example.com to only work for dynamic links and app.example.com for hosting (it is for my web app). But in the Firebase web console, there is no option to set this behavior. Any one please tell me how to set one of my sub domain only for dynamic links?
I have followed the firebase guidelines to host the website on firebase hosting, but the content of the website is not visible . I am seeing this on my screen as shared in the picture
what should i do about? please guide
Ensure that you have setup your website in the correct folder as Firebase uses folders to contain data for specific services, public for hosting and functions for cloud functions. You can find out what folder this is by opening the firebase.jsonfile at the root of your project You should find something similar if you usedfirebase init` correctly
"hosting": {
"public": "public",
Once you run the command firebase deploy or firebase deploy --only hosting everything inside this folder is uploaded to your hosting website.
Make sure you also check both URLs provided by Firebase as the web.app URL tends to take longer to update and deploy.
<project-id>.firebaseapp.com
Beyond these fundamental tips I would also make sure that your entry point into the website is also correct, opening the hosting folder (public or otherwise) - and opening up the index.html within should yield you the same site found on *.firebaseapp.com
I'm currently creating a website that is hosted on a vServer from another provider where you can upload images. I'm uploading the images to Firebase Storage. Can I change the domain when I rightclick -> view graphic that is my own domain? I already know that you can change the domain of firebase when you host the website there, but I don't want to host the website there.
There is no way for you to control the URL that is used to serve files directly from Firebase Storage. The download URLs are controlled by Firebase and always are based on your bucket/project name.
But Firebase server-side logic is a fairly thin wrapper around Google Cloud Storage, and you can set up a custom domain for Cloud Storage. You can ignore the parts that talk about this as being specific to hosting a web site there, as a web site on Google Cloud Storage is not much more than the files it consists of, you can apply the same to hosting other files. That should allow you to control the domain from which your files are served.
The final alternative would be to host the files on Firebase Hosting, which means they'll be served from a CDN with many global end points. The main difference here is that Firebase Hosting is typically better suited for files you generate, and not so much for files that your users generate.
I have a Vue.js app and use Firebase Hosting to serve the static files to users.
Does Firebase Hosting have a method for putting the app into maintenance mode remotely? Without having to do firebase deploy
Maybe something that will allow me to redirect all the traffic to some other index.html, and be able to manage it from Firebase.
P.S. I've already looked into Firebase Remote Config (and it doesn't fit my use case, and their web related tools aren't fully implemented yet). And I'd like to avoid having a realtime database just for maintenance mode.
There is no mode-switch built into Firebase Hosting for temporarily serving other content.
But given the recent updates to deploy efficiency, it should be pretty low-cost to put up a temporary index.html while making the changes. Alternatively, you could deploy rules (in firebase.json) that temporarily redirect all traffic to a wip.html (for work-in-progress).
Which of these works best, depends on your current content structure. I.e. if you already redirect "all" traffic to index.html, I'd probably go with a rewriting solution.
You can also unroll your last deploy in one command.
Deploy maintenance page
Unroll when its done
Don't forget to send a 503 error for googlebot, asking it to come back in X hours.
So I just wanted to host my Firebase Functions on my custom domain without hosting anything. I host my website somewhere else already.
Unfortunately, Firebase throws errors when trying to deploy functions with rewrites BUT without the public directory OR when the public directory is empty.
How can I do that on Firebase without a hack and hosting some redundant stuff? I just want to host the functions on a custom domain.
It seems that Firebase Hosting requires at least one html page, even if your only hosting functions. Just add a blank index.html to a directory and point hosting to that.