How to have a world class website. For free!
I know it sounds too good to be true.. but it is not. It actually possible, without any doubt, to have a free website, without any cost.
Though, to be honest, there is little catch, it doesn’t include the cost of your domain. ( I hope this is not a deal breaker. With current deals going on, you can snatch a good domain at rock bottom prices, check Namescheap).
What does it require:
- A debit/credit card (this is for validation by Amazon only, no charges are made)
- Domain name (If you don’t have, buy one from Namescheap )
- 30 min of your time!
Amazon Web Services:
If you don’t know about Amazon Web Services yet, then you should.
To have a fair idea about how big AWS is, look at image below:
Now come the best part: you can try out a set of services (with certain limitations) free of cost for one full year. Yes, you read it right, for a complete year. These services are listed (along with limitations) under Free Tier category .
Now, let’s start on out objective of hosting our site using this offer from AWS.
Create a new account on Amazon AWS portal. Top right corner in the previous image. ( Your usual amazon shopping account is separate from AWS services account, so you have to create a new account here). Fill in your details.
Fill in your card details. Worry not, this is for validation purposes only, and as mentioned you are not charged for free tier services for duration mentioned under free tier. You will be asked about your TAX details. If you don’t have any (or not sure to make this website as income generating source) you can choose No.
Please choose the basic support plan
Once your account is created and verified (it takes less than 5 min), log in into your console. Here you are presented with the main screen of AWS services.
[Currently, AWS has also started to publish short tutorials about how to build different solutions, using AWS services]
Click on top left corner, services and it will present you with all services of under AWS gamut. Click on EC2
Click launch instance:
Now, here you will be presented with all the virtual servers that are available as AMI (Amazon machine image). On left side, click free tier only:
For this tutorial sake, I chose Ubuntu server (you can choose whatever you are comfortable with). With that, you will be presented with next screen, where you have to choose configuration of your server.
Here, chosse t2.micro as it is free tier eligible
This AMI is going to be your webserver. This is just a bare shell linux installed machine image with 1 GB of RAM and 1 Virtual CPU. This is good enough for a moderate level website.
Now we move to next part of configuring it for being our web server.
Before we configure this machine for our use, we need to configure it for secure access. For the time being, you can use this guide to set that up.
How to install a good copy of wordpress is explained here. [An updated and simplified copy of this guide is under progress and will be updated within few days-7-dec’16]
Now once you have installed wordpress on your server, it is time to make it world class. Which as per initial outline of our project is installing our list of absolute must plugins and then integrating CDN.
Here’s is short list:
- Yoast SEO plugin: This plugin which takes care of SEO part of blog posts, is right now one of the best in marketplace.
- Cache plugins: You have choice between WP Super Cache, W3 Total Cache and WP Fastest Cache being top contender for now.
- EWWW Image Optimizer: Along with WP smush, this plugin is one of best image optimzer for wordpress.
Once these plugins are installed, there are few things, that needs to be setup in wordpress itself. For better legibility and also from SEO perspective.
Permalinks: Go to Dashboard>Settings>permalinks. Default option is to show post with some numerical id. This looks robotic. Change it to custom structure and put —
First one will show the post like <yourdomain>/category/post name and second one will show <yourdomain>/postname-post id(numerical).
Both are considered highly legible and hence valued accordingly by Google while indexing the site.
Rest of settings are there in the guide.
Cloudfront is cloud distribution network of Amazon AWS. CDN is one of basic requirement of any website that has global reach. This way, your website contents (static contents only) are served from CDN server, which is geographically nearest to be visitor’s location.
[There is an alternate way of storing your heavy files like images etc. on Amazon S3(storage service) and serve them via cloudfront to visitors. Upto 5 GB of storage is free under free tier. But this require additional work and should be used only when you are planning to have media heavy website]
Good news is, Amazon Cloudfront also comes under Free Tier services. There is limit to data transferred via cloudfront network which is free. Anything above that is chargeable. For a website with medium level traffic, this is more than enough.
Now again go back to AWS console and choose Cloudfront as service.
From Cloudfront console, choose create distribution & from next screen choose Web as delivery method:
In next step, fill out your domain as origin domain and click Create Distribution (bottom right corner):
This will take 15–20 min for Cloudfront to get to deployed state.
Once this is done, you need to make change to your cache plugin in wordpress to serve the content from CDN URL.
This is sneaky but maxcdn has provided a very simple way to make these changes in WP fastest cache plugin at this page.
A properly configured (which you will have by following this guide) website with:
- Proper Link structure
is ranked higher by Google search bots as compared to other websites. Under Amazon Free tier, you get 750 hours of free computing on your EC2 instance, which translates to 1 months of computing. 1 GB of RAM with CDN is more than sufficient for medium level traffic (more than 50k visits per month).
So now you have a website with only cost being your domain name. And with any consistent effort, within one year, you can grow your website to levels where any cost incurred will be well worth it.
Do share you views in comment section below. It will help me a lot in improving the posts :)
Originally published at Tinkoor.