Deploy your personal portfolio with a custom domain on Github


 

Creating and hosting a portfolio is what every modern day programmer has to do. I did it a few days back. At first, I didn’t know anything about the matter at hand. I did some research and was able to find a way that is super fast. I thought to myself so why not make this tedious process an easy one for beginners.. 

We are going to deploy a static website (a portfolio) with a domain name of our choice and host it through github-pages. So let’s get started !!

...

Here is what I did to host my Portfolio

    1. Get a domain name

GitHub offer for free a domain name which is .github.io, We all can agree that this domain name doesn’t look good so we are going to get a cool domain name. in my case i bought it from Hostinger for only $1. Or you can get it for free on Freenom 

There is .tk as top level domain that is available for free. So just visit the link and get a domain name. Since we are hosting a portfolio so it is advised to get a domain that has your name in it.

    2. Build your portfolio 

Now you'll need to develop your portfolio website. You can easily download a portfolio template from the web and change it according to your demands. or create it all by yourself..

    3. Managing the custom domain

    Add a CNAME file containing just your domain name


Now navigate to your DNS provider (Hostinger, Freenom, GoDaddy..) 

Find Something Like, ‘DNS’,’DNS Management’,’DNS Configuration’,etc. where there is an option to add ‘A’ or ‘CNAME’ records.

Create an A record, point to the IP addresses for GitHub Pages:

185.199.108.153 - 185.199.109.153 - 185.199.110.153 - 185.199.111.153

 Just ensure that the configuration looks like one below, by adding them.

     4. Publish your portfolio

After having your Domain and portfolio ready, Now Create a repository on GitHub and push your portfolio on it

Now make sure that GitHub pages is linked to your domain name. First of all visit your Repository. Click Settings. Now, Under GitHub Pages Section, check if the custom domain is set, otherwise enter your custom domain name and click Save.


And Voila! the site was Deployed ;)

Of course, don't expect to run full-fledged PHP sites via this. But for static websites, it's an easy and cheap way of doing it.

Comments

Popular Posts