Skip to main content

Completely Free Static Website Hosting - Using Github pages

Static Web Page

A static web page can be your portfolio, resume, or small biography, a business advertisement etc..
Static web pages consist of series of HTML, CSS, Javascript and Image files. This can be used to deliver a content to the end user as it is.
Even if its static content we need a some common space to store and access store and deliver this content, and that is called hosting a web page.
Source: Wikipedia - Static web page

When it comes to hosting we should consider following points

Availability

No one wants to let their users see a 404 page when they hit their bisuness URL in the browser. We can not give 100% uptime but atleast we should try to give 99.99% uptime.

Bandwidth

I dont think so anybody creates a web page that can be seen only by certain number of people at a time. Whoever hits the link they should be landed in the page.

Cost

I dont want to spend $$$/month for hosting a static web page of some KB's or MB's in size.

Easy to change

Lets say If we have to change the address displayed in the webpage, It should not be a very big process. Just an Edit and save isn't it?

Hosting a Static web page for Free

As I said we need a common storage to store and serve our static files. There are lot of storage services available where you can store and serve the files to the public using a publick sharable URL. But I personally prefer Github Pages for static web page hosting. Github pages is free for public repositories. Anyways we are going to serve static html files which anybody can see by a right click itself So I am fine with free repository. If you prefer private then go for it, its actually costlier if you consider some other paid hosting services. Bitbucket is another service like github where they provide all we have in github with free private repositories. But as I said I personally prefere github.
Read more about Github Pages here

Creating a static page using Github Pages


  • First of all You need an active account at github, Sign Up or Sign In to your account.
  • Create a repository with name in the following format

                <github_username>.github.io
                 Note: Replace <github_username> with your actual github username


  • Add a readme file to initialize empty repository.







  • Create a new index.html file with some html content/ Or if you have html files ready, simply click on Upload files near Create button and upload all your files. Make sure a file with index.html is mandatory. 







Wow! Your free static web page is ready

Planning to buy something on amazon.in? use this link to get Best deals on Electronics - Using this link will not cost you any extra money but supports blog posts like this. Thanks.

Testing

Now hit the URL <username>.github.io and you can see your html page output there.

Custom Domain

You can also have a custom domain for your github pages its super duper easy and cheap based on the domain you choose.

You can see the full guide to use custom domain from godaddy with guthub pages in this post.

Setup your home PC/Server with a low cost mini PC's starting from just 8,000 Rs Only/- - Checkout link here


In simple:

* Purchase a domain from godaddy
* Update custom domain in your project by click on settings button
* Update CNAME record in your Godaddy domain management screen

Let me know in the comment section if you guys want a detailed instruction on how to setup custom domain for github pages.

Comments

Popular posts from this blog

Upgrade your kitchen with latest Tech Gadgets and Make cooking faster

Welcome to our latest blog post, where we embark on an exciting culinary journey to elevate your kitchen experience with cutting-edge technology gadgets. In this fast-paced world, cooking has become more than just a necessity; it's an art form that deserves the finest tools. Join us as we explore the innovative tech solutions that can revolutionize the heart of your home, making cooking not only faster but also more enjoyable and efficient. From smart appliances to intelligent cooking assistants, we'll introduce you to a range of futuristic kitchen companions that are sure to inspire your inner chef and transform the way you create delightful meals for yourself and your loved ones. Get ready to upgrade your kitchen and embrace the future of cooking!  In this blog post, we will narrow down the vast array of available kitchen tech gadgets and present only 10 items, carefully selected based on product ratings, price, and their suitability for Indian kitchens.  Are you a Telegram u

TataSky Refresh after Recharge - Activate after Recharge

If you are using TataSky and doing recharge occasionally and that too after disconnection, this post will be very helpful for you. Most of the time you will not get the channels listed as soon as you make the payment. It will display message to Subscribe for that channel. You can easily get channels back by simply giving a missed a call from your registered mobile number. Note: Make sure your TV and SetupBox is on and showing the error message Give missed call to  +91 80892 80892 (Soft Refresh)   wait for 1 minute and If still not active then try giving missed call to  +91 90405 90405 (Heavy Refresh). Ad: Planning to buy a Best low budget Smart TV? Consider  Acer 109 cm (43 inches) I Series 4K Ultra HD Android Smart LED TV AR43AR2851UDFL (Black)  - You can get this TV as low as for 20,000 Rs - which has Bluetooth, WiFi, Android and good customer ratings (4.4/5). Note: Price based on offers, click on the link to see current price on the web page If the above ste

Duplicate file finder/Remover using perl and SHA1

When you are using a computing devices (either a laptop or PC or a Tab) for your personal use after some time (let take some years) you will realise that your disk is full and most of the space are occupied by duplicate files (Same copy of file located in different locations). For ex: You might have a favourite music file in "My Favourite" folder as well as in the "Album" folder. But finding this duplicate manually is a biggest process. That too if the file names are different OMG!. There are lot of free utilities available to do this in automated way, but if you are a programmer, you will always prefer to do it on your own. Here are the steps we are going to do. This is purely on a linux - Ubuntu system.  (for windows you might need to change the path as per conventions ) Getting SHA1 for all the files recursively in a given directory Compare SHA1 with other files Remove the duplicate file Getting SHA1 of a file Using cpan module   Digest::SHA1 we c