So, you’ve already learned to upload your project on GitHub right?
Not yet, then please refer to this.
Now, get ready to host your free website (static only).
1. First, create a new repository with your username.github.io
2. Now, you’ll get this page if you followed above instructions.
3. Add your html files in folder and start with git init and use
git README.md git add . instead as given in step 2.
Now, I can see my website on bjungbogati.github.io. You can by using your username.github.io .
For Custom Domain:
If you want to redirect your GitHub pages to your custom domain then, you can do it with few more steps.
- Create a new file called CNAME in existing site folder.
- Inside, CNAME file enter custom domain eg: bjung.com.np
- I use cloudflare to host my DNS. In DNS manager (register.mos.np), edit nameserver with your cloudflare’s. (Visit cloudflare and add your website). Register free .com.np if you’re from Nepal.
4. Use A record with domain name and GitHub’s IP Address 18.104.22.168.
Now, you’re all set, as soon as your nameserver is changed. Your site will be live. Until then, you can always view your site on your username.github.io .