What Happened Last Friday?
“Entrepreneurs must try new things, and trying new things will inevitably lead to making messes. The secret to being a good business owner is to get good at cleaning up your messes.”
Barney Cohen
On Friday, March 19th at about noon, Andre sent me a facebook message:
“Hi Will! I sent you an email earlier about the mega menu plugin and now it doesn't seem to be working, and a bunch of things have broken on your website. Are you right in the middle of editing it in some way? Little bit panicked!”
For the next 5 hours, I was a-lot-bit-panicked.
I quickly realized that the server where I host all my code for my plugins was down, and as a result none of my code was working on anyone’s website, even my own. Honestly this scenario is one of my worst nightmares.
To Andre and everyone else: Thank you for your patience during this outage. I know this can be frustrating, it was for me too (ask my wife). I’m in awe of how kind and understanding everyone was (a few of you even bought me coffee!), but do know that I take these problems very seriously and I’m always working to not let these things happen a second time for the same reason. To that end, I’m adding a new option to all the plugins that I sell- the ability to self-host the code on your own website.
For most of you, continuing to install and use my plugins the “easy” way will continue to be the best option- server outages are rare and usually pretty quickly fixed. However, for anyone who wants a slightly more cumbersome but overall more reliable way to install my plugins, or any code for that matter, onto your website, I will also be providing the code and instructions to do that with every plugin I sell.
In this article, I’m going to explain why this particular incident happened, what these <script> codes are that you add to your website, and show you how to self-host your own code (so that server outages won’t break a piece of your website).
What happened?
My plugins are all externally hosted.
This basically means my plugin code sits on a different website and it loads into your website as any user access a page. This is what the <script> or <link> element into your Code Injection area do, if there is an href or src attribute in them. Examples below:
<link rel="stylesheet" href="https://assets.codepen.io/3198845/TealCode.css">
<script src="https://assets.codepen.io/3198845/TealCode.js"> </script>
If you have the above on your website, it will import code that is sitting at those URL’s and add it to a web site whenever someone accesses your site. Both of the URL’s are live webpages, and are prone to things that may happen to a website, like the website going down or getting blocked. This is what happened on March 19th.
I was told by the host provider, Codepen, that, “A firewall block was triggered after some super high number of requests for your assets.”
Basically, so many of you are using my plugins, a security trigger shut down my code! Oftentimes, a way hackers can take down a website is by having thousands or millions of bots simultaneously access a URL, overloading the website. One way to prevent against these types of attacks is by setting up security triggers if an abnormal amount of people (or bots) access a URL at the same time.
From a technical standpoint, this wasn’t the hosting provider going down, this was an accidentally triggered security block. I’ve been assured it was a mistake and it won’t happen again.
To be clear, I still thoroughly enjoy my host, Codepen, and wholeheartedly recommend them. There is no single better way to host and edit code online. The fact that hosting providers can go down, and do go down, is just a fundamental tradeoff of using the internet. Being able to easily distribute code to thousands of websites is a very good thing, and a necessity of the internet.
However, that’s important for me as the code distributor, not necessarily for you as the code user. As a web designer myself, I understand how personally we take the designs of our websites. And having some code occasionally not work is worse than the entire website being down, because it breaks the entire design aesthetic. So here’s how I’m going to clean up my mess.
What am I going to do about it?
In the coming weeks, I’m going to add a self-hosting option to each of my plugins to accompany the externally hosted option. The self-hosting option is for more advanced Squarespace users who are OK with taking some extra time to install a plugin and know their way around Custom Code. Any updates to plugins that I publish you’ll need to get the new code and update it manually.
The externally hosted option is still available and is a good, easier and more simple option for most people- for what’s it’s worth, I’m still using the externally hosted option for my own site.
I’m also creating an article about self-hosting code on Squarespace for anyone who wants to learn.
Take-away
My big take-away isn’t that problems in your business won’t occur. They will. There are too many things that can go wrong with a business, especially internet-based businesses! My goal has been to quickly figure out how to identify the problems, communicate with your customers, and fix it. I’m not perfect at this and I’m always looking for feedback for how I can do better, thanks for being on this journey with me :)