Firebase multi-domain support to one instance - firebase

👋 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!

Related

UTM tracking across sub-domains

I have a main website (e.g. mybrand.com ) with static pages mostly developed on Wix.com and I have a full application hosted on AWS on a sub-domain, e.g. app..com.
For tracking the traffic coming from different social media channels, we are building UTMs. My understanding is that the UTM tracking doesn't work when you hop between the sub-domains. Can you please suggest some clever options?
One option for us is to re-do the Wix website in WordPress and host WordPress ourselves on AWS next to our WebApp to completely avoid the domain hoping. But if we have a more elegant solution while keeping the Website, it would be preferred.
You can use a simple parameter in querystring (i.e. subdomain.com/page?from=domain1) then in Analytics count unique page with that parameter in the URL.

What is the best way to handle some hidden sites in wordpress?

Web newbie. I'm setting up a family website for sharing photos, etc. I plan to purchase my own domain name and will rent space on some hosting platform. I'm thinking ahead and will eventually want to create two more websites (another family website for my father's side of the family and a personal one for me). The frugal side of me would like to limit the number of domains and hosts I have to purchase/rent.
I want the family websites to be hidden as much as possible (no SEO and requiring a login just to get to the main page), but I want my personal website to be public.
So far, what I've read says the above is difficult or cumbersome to do with wordpress multisite. If this is true, then is it safe to assume separate wordpress installs are more appropriate? Or, should I consider a new/different domain for my personal website?
Thanks,
Jim
I would:
Buy one domain example.com
Buy one hosting (shared or VPS if you have the skills)
Create multiple independent Wordpress, and use subdomain site1.example.com, site2.example.com
protect some websites with Htaccess (some free plugin may also do the trick, but with htaccess you are sure Crawler (like Google) won't access it.
There is a plugin called My private site which allows you to achieve what you are looking for:
https://wordpress.org/plugins/jonradio-private-site/
A full detailed step by step (blogpost) tutorial on how to make your site private is published here:
https://www.wpbeginner.com/beginners-guide/how-to-make-your-wordpress-blog-completely-private/

How can I efficiently set up wordpress and AWS Amplify together?

I have the need to have a project made up of two parts, the use case seems relatively typical:
An AWS Amplify react project, which has some API endpoints and a nice dashboard written in react.
A wordpress website with a blog, maintained by someone not very technical.
The reason for this separation is that the owner of the company is familiar with wordpress and would like to manage SEO as well as regularly writing blog posts. The main companies purpose (The SaaS) is the amplify project. There is a high probability that the owner will install lots of plugins on the wordpress site, and may well cause it to go down, in this case the amplify project must remain functional.
Ideally:
example.com -> Wordpress
example.com/portal -> Amplify project.
N.b I would like to use sub directories rather than a new subdomain, as I'm told that this helps with SEO as they will share the same page rank. The purpose of the blog is mostly for SEO and to attract people to the site.
What I have considered:
Set up a wordpress site, hosted on an Apache server (Maybe using AWS lightsail, one of the bitnami ones), and set up a reverse proxy on that Apache server to point at the amplify project.
The problems I think this approach causes:
The amplify project will be accessible from 2 URLs. The amplify app directly AND via example.com/portal; how do I stop this being available to the world via the amplify URL and only available through the reverse proxy (example.com/portal)?.
Should the apache server go down, the amplify app is then no longer accessible. The amplify project now depends on a single EC2 (or an auto scaling group potentially but this means adding a load balancer and much higher costs).
Amplify uses cloudfront as a CDN, by routing it all through a proxy we essentially lose the benefit that gives us.
Other option: Put amplify at the top
Have amplify use it's reverse proxy functionality to send requests to a wordpress page hosted elsewhere. This way if wordpress goes down, amplify lives on. My concerns here are:
Wordpress will be accessible from 2 URLs - How do I limit it to just allow the URL of the reverse proxy (example.com)?
I'll need to figure out how to get amplify to run on a URL that isn't the root of the domain, e.g "example.com/service" and will need to get the root of the domain to hit the reverse proxy.
What would make an ideal answer for and hopefully others:
Which of these options you would pick (or a different one) that might help to minimise costs whilst keeping the same level of resiliency of AWS Amplify, and why? Please try to answer in a way that may be useful for a typical set up for others to follow.
Check this one out. Basically AWS Amplify is just the tool. You would need to choose the framework that could be integrated with headless wordpress (via its api) easily.
https://www.cloudways.com/blog/use-react-with-wordpress-to-create-headless-cms/

Best solution for centralised user management system for multiple systems

Currently, we are running 2 web pages based on WordPress, custom application built in JS (Hapi, Angular, Mongo), as well as self-hosted GitLab repository and hosting based on ISP Config. Currently, user which want to use more than 1 service is forced to create multiple accounts.
What would be the best approach to centralize it assuming that we want:
a user to use same credentials on each page
allow a user to log in using social login (Facebook, Google, Twitter) and still keep his single profile
centralize information about user services, usage and billing information (invoices)
We do not want overcomplicate the solution, therefore, we don't want to centralize access management and obtain them from centralized server, each page/service will maintain it's on it own (i.e. when user makes a purchase in on of the WP sites (woocommerce) wordpress itself will maintain order and we will write custom code to report sale to centralized system for billing purpose)
We are currently considering using LDAP or Kerberos, what would suit better?
Secondly - how to cover part regarding social login? I assume that we should still allow user register using OAuth2 and somehow synchronise the data between each service and centralized system. Is there another way?
Your desires [correct me if I'm wrong]:
You have two apps that are essentially separate things.
These apps can be served from a web page via HTTP, and either don't
have an auth system or need one revamped.
You want a centralized login system with social auth.
You have a single business entity.
You want a single, combined source of data for e-commerce.
You are essentially setting this up from scratch on the WordPress
backend side, there is no current mixed ecosystem of users.
My thoughts:
You DO NOT want LDAP or Kerberos. Those solutions are much too complex for this situation.
You want a SINGLE WordPress install. You can easily setup the backend to answer to multiple domains. In other words a single wordpress install can handle pages at "domain1.com" and "domain2.com" and render the pages with compleately different headers and text to make them APPEAR as two sites. There is no reason to maintain two separate lists of users, because you want a single system to login. Differentiate the users based on their business data, i.e. user1 has data "registered on SiteA", user2 had data "registered on SiteB" etc.
You can place your app into a WordPress page, then use is_user_logged_in() to firewall it behind WordPress. This is an industry standard method of auth and extremely secure if setup correctly. Or if it's a data api, you can place it as an endpoint and leverage the exact same auth system.
Any of the major social auth plugins that are popular in the free .org repo should work out the box with this method.
If you are going to associate blogging, that is, many "posts" about the products, and you want those blogs to be different ecosystems, with different sets of users, you are looking for WordPress Multi-Site. I don't think this is what you want. You don't sound like you are going to "blog". Or at least every page is going to be meticulously curated on these combined sites. So you're probably looking for just a single install to serve content to two domains. NOT MULTISITE.
You should use WooCommerce, simply because it is the most widely supported platform. Setup is 100% free.
You can easily serve pages that are branded totally differently, even in one install. For instance, one WordPress site can serve pages to two domains, and put different logos and headers on the top of the page to make them appear different. One physical machine can serve two domains.
Bottom line: You want a single WordPress setup on a single machine, serving two domains. The content and appearance on the domains can be different at will. Use any popular social auth plugins in the .org repo to firewall the apps.

Multi tenancy in firebase hosting

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.

Resources