In this tutorial, we will guide you through the process of setting up a custom domain for your GitHub Pages site. By the end of this tutorial, you will be able to purchase a domain, configure your GitHub repository to use your custom domain, and verify your domain with your DNS provider.
Prerequisites:
- Basic knowledge of GitHub
- Basic understanding of DNS (Domain Name System)
Settings
.GitHub Pages
section.Custom domain
box, type the name of your newly purchased domain and click Save
.www
that points to YOUR-USERNAME.github.io
, replacing YOUR-USERNAME
with your actual GitHub username.www 3600 IN CNAME YOUR-USERNAME.github.io.
www
: the subdomain for which the record is valid.3600
: the time (in seconds) that the record is cached by DNS resolvers.IN
: signifies that this is an Internet record.CNAME
: the type of DNS record.YOUR-USERNAME.github.io
: the domain the record points to.@ 3600 IN A 185.199.108.153
@
: signifies that this is the record for the root domain.3600
: the time (in seconds) that the record is cached by DNS resolvers.IN
: signifies that this is an Internet record.A
: the type of DNS record.185.199.108.153
: the IP address the record points to.In this tutorial, we've covered how to purchase a domain, how to configure your GitHub repository to use your custom domain, and how to verify your domain with your DNS provider.
For further learning, it would be beneficial to understand more about DNS and how it helps in the process of domain name resolution.
Remember to continually practice your skills and explore different aspects of web development. Happy coding!