Building a Personal Website (Mini-Series Part 4)
Configuring a Customer Domain
Ever customized your Linkedin profile URL because it looked like jumbled letters? A custom domain is a unique branded label that is connected to the IP address of a website. A domain name gives you ownership over your website’s address so that no one else can claim it. The great thing about custom domains is that they simplify how visitors find your site and reinforce your brand. When deciding on a custom domain name for you or your business, make sure it clearly positions your brand. Now that we have our website, and it’s hosted, we want a unique label where we can point our users to. We will be using Github to customize the domain name of our Github page.
- Visit Google Domains to find a domain name that is available to use and register it. I have registered the domain tarakrishnan.net for my personal website. (Note: It may take up to 48 hours upon purchase for your domain to be confirmed.)
- Under the new
<USERNAME>.github.io
repository you created navigate to settings and scroll to Github pages - Type your custom domain, then click Save. This will create a commit that adds a CNAME file in the root of your publishing source
4. Navigate to Google Domains and click on your domain name
5. Click on DNS and create a CNAME
record that connects your subdomain to the default domain for your site
6. Add 4 separate A
records. A
records connect your domain name (hosted by DNS) to the IP address on the Github server. For more information see here
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
7. To confirm that your DNS record configured correctly, use the dig
command. You can see that your custom domain points to the Github server IP address
$ dig tarakrishnan.net +nostats +nocomments +nocmd
; <<>> DiG 9.10.6 <<>> tarakrishnan.net +nostats +nocomments +nocmd
;; global options: +cmd
;tarakrishnan.net. IN A
tarakrishnan.net. 3599 IN A 185.199.109.153
tarakrishnan.net. 3599 IN A 185.199.111.153
tarakrishnan.net. 3599 IN A 185.199.110.153
tarakrishnan.net. 3599 IN A 185.199.108.153
8. Visit your new domain name to see your new Github pages displayed on your custom domain website
If you have been following along through this mini-series you should now be familiar with creating a static website, hosting a website, and creating a custom domain for your website.
As an example, here is the source code for tarakrishnan.net (project repository, static repository).