Multi tenancy in firebase hosting - firebase

I'm trying to use firebase with different subdomains, but serving the same content.
I've managed to redirect subdomains, but I need to stay routed to it.
When I type for exemple: subdomain.mydomain.com, I'm being redirected to mydomain.com.
I need it to stay on subdomain.mydomain.com.
The subdomain will be created dynamically.

For reference, see the answer from Chris at How do I make a custom subdomain on Firebase?
As it stands this is not currently possible, although it seems to be an often requested feature that they are working on.

Related

cannot use some certain subdomain for firebase dynamic link

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

Can't setup dynamic links with custom domain linked to Squarespace

I'm having issues setting dynamic links with a custom domain. My domain is from Google Domains, and it's linked to a Squarespace site. When I try to add the A records to my domain on Google Domains ... it says the records already exist. And I can't figure out how to override or remove them. Or if that will mess up my linkage to Squarespace. Thanks!
Few of things I was missing, with great help from the Firebase slack channel:
First, You can't use the same domain as your Squarespace domain. You'll need to create a subdomain. I used link.???.com
Second, when I changed the DNS settings, Firebase instructions ask you to add two A records. But the second always fails saying it already exists. Support folks said you only need one, the second is for redundancy. Instructions should state this!
Next, I was missing steps 1 and 3 in these instructions. For step 3, make sure you create the property as an array.

Firebase multi-domain support to one instance

👋 I'm hoping to use Firebase to create an application that will allow users to make their content accessible via a custom domain. This is probably best described as a similar setup to how WordPress Multisite Domain Mapping works where there would be a main site, domain.com and many subsites based on their content customdomain.com mydomain.com anotherdomain.com.
The domains (100+) would point to the same codebase + Firestore, but based on the domain - would serve different content. All content swapping would be stored within a cloud function to serve the appropriate site.
I did see this domain limit exceeded FAQ but I wasn't sure if that applies to what I'm attempting to do at a DNS level.
I'm currently doing this in an older version of the app with DigitalOcean and an individual CloudFlare site that points to the same server, but it's a major pain to setup Page Rules, SSLs, etc instead of something that could hopefully be automated.
Thanks for any info!

How to turn off default domain in firebase hosting [duplicate]

This question already has answers here:
Redirect to Firebase Hosting custom domain
(3 answers)
Closed 3 years ago.
I am hosting a site on Firebase hosting. It has a default URL of myapp.firebaseapp.com. I have configured a custom URL for my app and it is sub.domain.com. The issue i am having is that both are still accessible. Users can access the app from myapp.firebaseapp.com and sub.domain.com. I need users to only be able to access sub.domain.com.
Is there a way to turn off the default domain within the Firebase console or do i need to accomplish this with a rewrite or a redirect?
Any help would be greatly appreciated. I searched around and was not able to find any information regarding this issue. Below is a screenshot showing that both domains are configured correctly.
I think your only option (at least for now) is to use to redirect the users. You could redirect your users from default to the custom url using simple Javascript. That could be done by getting the host (window.host), checking if it is the default or the custom url and redirecting if necessary.
Your default domain could not be turned off. The only option is not make it public at the moment.
Or you can tweak a cloud function that will redirect your functions to new custom domain.

Google adsense for wordpress multisite

Here is my scenario:
I have a server where i want to host 50+ Wordpress websites. Each website needs to have a different domain name (i don't want to use sub domains) and each website must have independent google Adsense code so if something goes wrong due to google's rules the others should not be affected.
So my question is which one is more suitable:
Install each Wordpress site in a different directory on the server
Use the Multisite function that Wordpress offers
If number 2 is more appropriate i want to be absolutely sure that i can make it work with different domain names and have independent google Adsense codes
10x in advance.
P.S.
If something is not clear with my question let me know so i explain it in details.
I am not sure if you are aware of it or not. In multisite. The domain name changes but the core domain is same. Something like. Xxx.yourdomain.com. Where xxx can be anything.
As per adsense rules. It applies to website. So anything that is associated with your website. Rules do apply.
I guess you are confused about what you want. You said you don't want to use sub domain but wordpress multisite option is for making sub domain.
You would be violating google adsense policy if you use different accounts to like different content on same domain. Let me know if you want to know more

Resources