031 - How To Host A Website (Part 1)
31 Aug, 2017
Once you’ve learned a bit of code, you want to show it off! Here are some of the options you can try for hosting a static website.
In part 1 of 2 we’re talking about hosting static websites, or sites that don’t require any database connection or dynamic content. You might want to buy your own domain name (ex: yourname.com) which is where people will find your website. Separately, you will need website hosting, a service which stores your webpage files on a server and sends them to users when they visit your domain.
There are many companies eager to sell you a domain name and/or their hosting services. Sometimes you can bundle the two and get some great discounts! Here’s a quick overview of the different web services I mention in the podcast (not a comprehensive list!!):
Free Web Builders
- Do a Google search for “free website builder YEAR” (whatever year it is now) and check out the lists people have curated for what’s hot at the moment. There are MANY options!
- Most have a drag & drop interface…you can write the code on some but these are designed so you don’t need to know how to code.
- Choice & customization possibilities are limited.
- You will be required to keep ads on your site!
GitHub Pages
- GitHub Pages Link
- A much better free option if your goal is to show off your own code.
- Post your code to your GitHub account and your site will be automatically generated from your repo’s master branch.
- Check out episode 14 to hear about git & GitHub basics.
- Your site can be visited at yourusername.github.io, or you can hook up your own domain.
Squarespace
- Squarespace Link
- Drag & drop easy user interface but waaaaay cooler looking pages than the free options!
- You really don’t need to know how to code to use Squarespace but it’s a good option for getting a site up quickly, and you can code customizations if you want to.
- All Squarespace sites are responsive – no matter what device people check out your site on, it will look great.
- But it comes at a cost! At the time I recorded this podcast accounts start at $12/month and go up from there. Squarespace hosting includes a free domain name which you can port to another registrar if you decide to close your account.
- Look for vouchers or promo codes to get some discounts or free service.
Wordpress.org
- Wordpress.org Link
- Different from wordpress.com!
- Free, you’re not required to have ads on your page, but you need to pay for your own hosting.
- All hosting services are Wordpress compatible. Some may require you to install it yourself, but most will even do the Wordpress installation for you.
- There are many free Wordpress templates, some better than others…or you can buy a template for more features.
- Or of course build your own template! You will need to learn PHP and CSS (and a bit of JavaScript).
- You can make your site really dynamic with Wordpress plugins for social media, SEO, eCommerce, etc.
- Unfortunately because it’s so popular, it’s also very vulnerable to security threats (listen to my story as a tale of caution!!!). Be sure to update your Wordpress software and plugins often to avoid being hacked.
- Be sure to backup your site regularly too in case you do get hacked. There are plugins that can do this for you.
Amazon Web Services
- AWS Link
- Certainly the most complicated of these options…very steep learning curve for newbies!
- Many AWS services are free to try for a full year. At the end of the year you go to the normal pricing, but even so it’s still pretty inexpensive. For example, monthly hosting on AWS might cost $0.50/month compared to $7+ monthly on other hosting services.
- AWS is very scalable. If/when you want to expand the capabilities beyond just a basic static site, you’ll be able to do it pretty seamlessly. (For example, you can grown to the scale of AirBnB, NASA, GE, Capital One, or Netflix to name a few…all users of AWS!)
My Approach
So which of these should you choose? My approach is always based on my goals for the site I’m building at the time. Do I want it to be ready quickly, do I want it to be inexpensive, or do I want it to be high quality (ideally with my own code)? You can only get 2 out of 3 at a time!
For fast & quality, Squarespace is certainly the one to pick, but I’ll pay more than what I’d like. For cheap & quality (well, as good quality as I’m capable of writing), it’s AWS…but the tradeoff is the time it will take me to write my code, AND the time to figure out the monster that is AWS!
The next thing I ask myself is what are the goals for this project. If it’s something I know I’ll keep up long term, I’ll take the time to set things up properly on AWS and build it myself from scratch. On the other hand if it’s something I’m just trying out, I might start on Wordpress.org (with a steeply discounted hosting plan) just to get something up quickly and see whether I’ll actually stick with it. Perfect example–startovercoder.com!
Next question–are there any deals to be had? Even though I prefer AWS, sometimes it’s worth it to use another service in the first year to take advantage of their promotions. For example, to buy the Start Over Coder domain on AWS it would be $12 for the domain, plus the monthly hosting and storage costs. Instead I used a registrar which offered a free domain and 12 months of hosting for $11.92! At the end of the year it’s just a matter of moving everything over to AWS (another great skill to learn!).
Visit domcomp.com to compare the latest prices & services from many registrars at once.
Final question: I ask myself what I want to learn by building my website. Personally, I’m not interested in learning PHP (not for now at least) so I’m fine to use a mediocre-looking Wordpress theme rather than building my own or doing a lot of customizations. On the other hand, having a level of comfort with AWS will be a great asset (I think!) when it comes to looking for jobs, so I accept the pain & time that will go into figuring it out.