How to connect custom domain from host pinnacle to your Github hosted site
A domain is a unique identifier that represents a website or an online resource on the internet. It is the part of a URL that comes after the "www." and before the top-level domain extension (such as ".com" or ".org"). For example, in the URL "www.example.com", "example" is the domain name.
Domains are needed because they provide a human-readable and memorable way to access websites and online resources. Without domains, we would have to remember and enter complex IP addresses (a series of numbers) to access a website or online resource. Domains make it easier for people to find and access websites, and they also allow businesses and individuals to establish a unique online identity and brand.
Domains are also important for website owners because they can affect search engine rankings, website traffic, and overall online visibility. A well-chosen and well-promoted domain name can help attract more visitors to a website, while a poorly chosen or obscure domain name can make it difficult for people to find and remember a website. Additionally, owning a domain name gives website owners control over their online presence and enables them to create professional email addresses and custom branding for their online business or personal website.
GitHub Pages is a great option to host a website without spending a dime on web hosting fees. However, by default, GitHub Pages provides a subdomain for your website. But, you may prefer to use your own domain name instead of a subdomain provided by GitHub Pages. Luckily, you can connect your custom domain to your GitHub Pages site easily.
In this blog, we will guide you through the steps to connect your custom domain to your GitHub Pages site.
Step 1:
Purchase a Domain Name
First and foremost, you need to purchase a domain name from a domain registrar. A popular domain registrars in kenya is HostPinnacle The price of a domain name varies depending on the extension and the domain registrar you choose. Once you have purchased your domain name, you need to log in to hostpinnacle's client login dashboard . You will find your information and the domain you purchased.Click on your domain and check if it is active if not make a ticket and ask them to activate your domain.
Step 2:
Configure DNS Settings
Next, you need to configure the DNS settings for your domain. You need to add a CNAME or A record to your DNS settings to point your custom domain to your GitHub Pages site.
below are the general procedures to connect your site to Github to your custom domain follow the following:
- Add a CNAME record if you want to use a subdomain (e.g., www.yourdomain.com).
- In the Name or Host field, enter your subdomain (e.g., www).
- In the Value or Points to field, enter your GitHub Pages URL (e.g., yourusername.github.io).
- Add an A record if you want to use the root domain (e.g., yourdomain.com).
- In the Name or Host field, enter your root domain (e.g., yourdomain.com).
- In the Value or Points to field, enter the IP address of GitHub's servers (185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153).
For hostpinnacle what you need to do is open a ticket then write your cname records and ask them to add your cname records .- In the Name or Host field, enter your subdomain (e.g., www).
- In the Value or Points to field, enter your GitHub Pages URL (e.g., yourusername.github.io).
- Add an A record if you want to use the root domain (e.g., yourdomain.com).
- In the Name or Host field, enter your root domain (e.g., yourdomain.com).
- In the Value or Points to field, enter the IP address of GitHub's servers (185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153).
Tip:Be sure to include the trailing period at the end of your Github page (yourusername.github.io.)Which i have identified to be causing an issue.
your message should look like this
Cname records :
Host name =example.co.ke
Value=example.github.io.
A records:
In the "Name" field, enter @ :
In the "Value" field, enter the IP address of GitHub Pages: 185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153
Host name =example.co.ke
Value=example.github.io.
A records:
In the "Name" field, enter @ :
In the "Value" field, enter the IP address of GitHub Pages: 185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153
Your ticket will be answered and the changes will take effect. you will now be able to use your new domain name.
Step 3:
Configure GitHub Pages
Once you have configured the DNS settings, you need to configure your GitHub Pages site to use your custom domain. Follow these steps:
1. In your GitHub repository, click on the Settings tab.
2. Scroll down to the GitHub Pages section.
3. In the Custom domain field, enter your custom domain name (e.g., yourdomain.com).
4. Click Save.
Step 4:
Wait for DNS Propagation
DNS propagation is the time it takes for your DNS changes to take effect. It usually takes a few hours, but it can take up to 48 hours for the changes to propagate worldwide. During this time, your website may be inaccessible or may display a GitHub Pages default page.
Step 5:
Enjoy Your Custom Domain
Once the DNS propagation is complete, you can access your website using your custom domain name. Congratulations, you have successfully connected your custom domain to your GitHub Pages site.
connecting your custom domain to your GitHub Pages site is a straightforward process. By following the steps outlined above, you can use your own domain name for your GitHub Pages site.