I have my website site.com hosted on Firebase Hosting and a simple API on Firebase Cloud Functions.
Right now the API can be accessed on https://us-central1-SITE.cloudfunctions.net/
I know that I can use firebase.json to rewrite the function URL to my custom domain and do something like site.com/api-function-name.
Is there a way to redirect the API URL to a custom subdomain and keep the main domain only for the website hosting?
So I'm trying to make:
api.site.com => access API functions
site.com => access website content
Yes, that is possible. Your api.site.com and site.com will be two separate sites, that are part of the same Firebase project.
See the Firebase documentation on adding additional sites and setting up deploy targets for your sites.
Related
I have a Firebase project with Hosting enabled. My default url (given by Firebase) is
<PROJECT_NAME>.web.app. How can I also deploy to dashboard.<PROJECT_NAME>.web.app? I want authenticated users to be able to see this special dashboard.<PROJECT_NAME>.web.app url.
Whenever I try adding this as a custom domain, Firebase asks me to add some stuff regarding to web.app, which I can't.
Note: I am using React for my project.
You don't get any control over the web.app subdomain that's automatically created for your project. That is entirely managed by Google. If you want to customize a domain, you will have to register one of your own and manage its DNS for use with Firebase Hosting as described in the documentation.
I am quite new to firebase dynamic links, I was trying to create a firebase dynamic link with a subdomain let's say: apple.page.link, but then it showed an error this subdomain cannot be used by anyone? So what does that mean, are there some certain types of subdomain only that I can use? Do I need to have my own website to create firebase dynamic links?
When adding a subdomain, you need to verify the root domain first.
Please refer to the Firebase Subdomain official documentation:
https://firebase.google.com/support/troubleshooter/hosting/dns/subdomain
I am setting up dynamic links with custom domains using firebase for unity. In the documentation here, https://firebase.google.com/docs/dynamic-links/ios/receive#open-dynamic-links-in-your-app, I can see that I need to add plist entries to the FirebaseDynamicLinksCustomDomains
key to whitelist these domains in my app.
My question is if I can use a wildcard subdomain here, as my setup includes dozens of custom subdomains, some of which may be created after the app has shipped.
FirebaseDynamicLinksCustomDomains
https://*.firebaselinks.example.com/links/
Will this work to allow opening the app from any subdomain on firebaselinks.example.com ?
I've got a website hosted on firebase www.example.com. I'd like to serve some functions in the same project from api.example.com.
Rewrites seem to only support directories and not subdomains though. Has anyone been able to accomplish this? Do I have to just use two different firebase projects?
Rewrites won't handle domain names directly. As you say, you can use a second project, and route calls to your API via your custom domain using Firebase Hosting integration with Cloud Functions.
I currently have a Google App Engine application, myapp, to which I have assigned a custom domain, mycustomdomain.com. mycustomdomain.com is currently registered through Google Domains. I set up the custom domain as instructed by Google's docs and it is all working as expected.
Now, I would like to create a subdomain, blog.mycustomdomain.com and point it to my hosting company (i.e. not direct it to my GAE app), where I have a self-hosted Wordpress installation.
I have tried doing this through an NS entry for the subdomain blog through Google Domains, but this does not work.
Could someone direct me if they know how to do this? Thanks.