I successfully set up a custom domain (*.ourpixo.com) in Firebase and added the required CNAME records in Cloudflare DNS, which initially worked as expected. However, I encountered an issue when attempting to proxy the CNAME records through Cloudflare: Firebase issued a warning about the proxied records. Despite ignoring the warning, Firebase removed the custom domain after three weeks, resulting in my users being unable to access my service! To avoid this issue in the future, I’m looking for a better solution that allows me to leverage Cloudflare’s features, such as DDoS protection, caching, and performance optimization, without relying on a custom domain in Firebase. Instead, I plan to use my Firebase projects’ default URL while still benefiting from Cloudflare’s capabilities. Any advice or recommendations on achieving this would be greatly appreciated.
What feature, service or problem is this related to?
I set up a wildcard domain (*.ourpixo.com) pointing to my Firebase project default URL. The goal is for requests to my wildcard domain to display the web page content from my Firebase project default URL. However, instead of loading the content, I’m encountering the error: The page isn’t redirecting properly.
I’ve already added a CNAME record in my DNS settings to redirect my wildcard domain to my Firebase project default URL, but it seems like there might be additional steps I’m missing to ensure the DNS configuration works correctly. Any guidance on resolving this issue would be greatly appreciated.
Make sure your origin SSL is in place and working. You can set the DNS record to “DNS only” to verify it works without Cloudflare before switching back to “Proxied”.
@sjr I get what you mean. But I don’t want to use Firebase custom domain because they would delete the custom domain after a while if you use Cloudflare proxy. This happened to my site this morning and I want to prevent that from happening in the future.
I want to point Cloudflare to the firebase project default URL instead. Do you get my explanation?
Cloudflare doesn’t offer masking directly itself, but you can implement it yourself on Cloudflare.
My preferred way is (if you have a Pro/Business/Enterprise plan) use a Snippet, as they are unmetered, to do the proxying for you as here (just remove the path changing part)…
If on a free plan, a Worker can use the same code but you’ll have to watch the Workers free plan daily request limit, or the cost of requests on the Workers paid plan if your site is busy.