⛅️ Cloudflare : Static HTML

Yes, I know I recommended against using cloudflare but that is down to the fact I’m using blogger as my blog platform, if ever this changes to WordPress, technically and security wise, I prefer cloudflare.

However, you need to match the registrar for your current requirements, not my future requirements, moving from Blogger it to WordPress is absolutely something I’ll be covering, just not now.

I would like to, therefore reuse ♻️ the domain grizzybear.uk to show you where Cloudflare is fantastic, the plan here is to host static HTML from an Azure storage blog, in disguise not as a transformer buy a server-less web server.

I already have storage account set up, therefore, the goal with Cloudflare is to get it displaying that static HTML via the domain grizzybear.uk- both the root and www domains.

The technical workings out

Right, this is the plan for what should occur, so we can then go and build it, it goes like this:

  1. A record for grizzybear.uk
  2. A record for www.grizzybear.uk
  3. Both A records proxied in Cloudflare
  4. Page rule to redirect all pages in the criteria to the end website.
Cloudflare : A records

The A record needs to exist for this to work, and it needs to be proxied, however where it points does not matter, as the goal is to get the proxies to Cloudflare so the page rule can do that magic.

The A records here for the root domain point at 192.55.22.1 and the www resource is 192.51.22.1, the actual IP does not matter the "proxied" does - that is the orange cloud symbol


Once these records are added if you visit the website, after a very unconfortable hang you get the sign that things are now on the Cloudflare doorstep.

Note : A timeout is exactly what we want as there are no resources on 192.55.22.1 or 192.55.22.2, we just need to get it to Cloudflare for the next step in the magic trick!



Cloudflare: Add Page Rule

Now we require a page rule to make this puppy fly, so in Cloudflare navigate to the Page Rules


Then we need to create a rule:


Once here we require in the URL the string *grizzybear.uk/* which will cover anything before the domain name and after the /

Then we require a forwarding rule with a 301 to go to the destination as you can see below:


Then ensure the rule is enabled:


Cloudflare : Try the website

That concludes the checklist for take off, now you need to try the website and see if it return the magic, and in this instance yes it does, and its immediate.



Previous Post Next Post

نموذج الاتصال