Home > Hosting, Servers & Security >

How I Use Google to host Landers with SSL, CDN & Domain for Free (2)


06-20-2021 01:03 PM #1 ScottyG (Senior Member)
How I Use Google to host Landers with SSL, CDN & Domain for Free

Google Firebase ladies and gentlemen.



Forewarning, I am a programmer but an idiot when it comes to AM and these guys may not be used for a reason I don't understand. However, they have worked great for me so far and I can't see any issues.

It's got a fancy Google CDN that delivers stupid fast worldwide and scaling so you don't gotta worry if you hit a lick and get 2,000 visitors.

But my favourite part is how fast and easy it is to host new landers.

- - -

Setup

First of all signup for an account at Google Firebase. Just use the free plan, no need to upgrade for a while. I've personally ran 500,000 impressions so far without a single hiccup or dollar cost.

Create an app after that.

When creating the app, be sure to select "Setup Firebase Hosting" as well.

After you have this all done, you'll see an npm command you have to run.

In order to run NPM commands, you'll have to install Node Js.

Once Node JS is installed you can run the Node js command prompt to open a terminal.

I usually make a folder for my landers so: "mkdir landers" and then "cd landers".

Then I run the npm command: "npm install -g firebase-tools"

This will take a bit, let it run.

Next, we need to connect to our firebase.

We run: "firebase login"

Your default browser will open to a google login page, simply login normally and grant access.

Next up: "firebase init"

It will ask you to start a project, hit yes, use an existing project.

When it provides you the options, use the arrow keys and space bar to select Hosting and then enter to confirm.

Leave the public directory as public and say "N" to redirecting all URLS as a single page app.

Say "N" to github as well.

After that it will say Firebase init completed!
Perfect!

- - -

Adding Landers

So, to add a lander, simply throw it into this folder we created called 'landers' in the 'public' folder.

I personally have my Visual Studio Code open to this entire folder at all times so I can quickly make edits to any of my landers and instantly have it go live.



Any time you make a change, all you need to do is go to the Node Js command prompt again and type "firebase deploy"

This will push all the new changes and files to the cloud and in about a second it will be live.

You also get a free domain with this to use, crazy right.

This is a great method for those with ADHD that need quick ass changes, I can add my TikTok pixel to six landers, copy and rename a lander for a new page, split test and just hit up arrow and enter on the command prompt to have it live instantly.

SSL, CDN and Domain all covered. Free too.

I'm sure there will be questions, let me know and I'll do my best to answer.









06-20-2021 03:32 PM #2 jeremie (Moderator)

Nice solution for newbies who need to keep the costs down.

Pay attention though that you only have 10GB free outgoing CDN traffic. This is usually gzip compressed data, so you can reach 500,000 impressions if you can get landers + images at 20KB total. Otherwise, put the images on a subdomain with CloudFlare proxy.

Quota for Hosting data transfer
Every Hosting site is automatically backed by our global CDN for free. Data transfer from the CDN to your end users is free up to 10 GB/month.

If you are not on the Blaze plan, and you reach the 10 GB/month limit of free data transfer, we offer a short grace period but then your sites will be disabled. Your sites will remain disabled until the start of the next month because data transfer billing is based on monthly usage levels. You can reenable your sites immediately by upgrading to the Blaze plan.
https://firebase.google.com/docs/hos...-pricing?hl=en


Home > Hosting, Servers & Security >