Github has the option to host your web page in your Github Page. You can host the web page in Github and get the Github URL for your web page and access it free. They allow you to host only the static web page on the Github. It will accept HTML, CSS, image, font and js files only. In the previous post, i will share how to set up your page in the Github learns it here.
Github has the option to configure the custom domain for your webpage. For this, you just need the costume domain. You can buy your own custom domain from the domain provider. You must pay money for the costume domain based on monthly and yearly subscription.
After that, you must do small configuration on your domain. Follow the below steps to configure the Costume domain to your Github webpage.
First login to your Domain prover account after that you go to a DNS manager page.
After reaching the DNS manager page you can see the option like A Record, C NAME Record, AAAA Record etc.
Here you add the A NAME Record and CNAME Record.
First, add the A NAME Record for your domain.
Click the Add A NAME Record option, it will take to Add page. In that, you can see some input fields. In that, you must enter the Github IP address to map your domain to Github page.
First filed you can see the Host Name. In that, you do not give any value. Next, you can see the Destination IPv4 Address you must enter Github IP Address. 188.8.131.52 and click the Add Record to add the IP address.
The same Step repeat again adds another one IP address 184.108.40.206. Follow the above step to add the second IP address.
See the below screen show. This screen varies for the different services provided. But Field is same.
Second Add the CNAME Record.
Click the CNAME record button it will take to CNAME record add the page in that you can see the Input fields.
First one is a Host Name if you're going to add domain name like www.domainname.com means you give the input value www in the Host Name.
Otherwise, you will go to add the subdomain. An example, you host your blog on the Github mean. You need the domain like this blog.domainname.com.
So here you must give the value blog in the Host Name input field. I think you must under this.
And second field you can see the Value Field in that value field you must enter the GitHub page URL. For which page you want to redirect to your custom domain.
My Github page URL is tricksschool.github.io means I will enter the tricksschool.github.io in the value field.
And click the add record to add the CNAME. It will take some time making the change.
After add CNAME you add the CNAME file in the Github.
Just open the text editor and type your domain name in that file. Like below.
One important thing you can save the file without any extinction. Like .txt, .html, .doc etc. You do not give the extension to that CNAME file.
After creating the CNAME you must upload the file into your Github Repository.
After completing all these steps it will take 2 to 3 hours time to configure.
After that you can try your domain in the browser Github page will redirect to your custom domain.