Skip to main content
GitHub Page Deploy (Custom Domain)
  1. Posts/

GitHub Page Deploy (Custom Domain)

·247 words·2 mins· loading · loading · · ·
Deploy Domain Github
Table of Contents
Quick notes on how to set up domain configurations for GitHub Pages.

Setup

DNS provider

Set up the DNS records for your domain. Below are the records you need to add:

Record TypeNameValue
A@185.199.108.153
A@185.199.109.153
A@185.199.110.153
A@185.199.111.153
(optional for www) CNAMEwwwyour-username.github.io

GitHub

  1. Go to your repository settings.
  2. Scroll down to the “GitHub Pages” section.
  3. Under “Custom domain”, enter your domain name (e.g., escalopa.com).
  4. Click “Save”.
  5. If you want to use www (e.g., www.escalopa.com), check the box for “Enforce HTTPS”.
  6. Wait for a few minutes for the changes to propagate.

Validate

DNS changes can take some time to propagate. If you don’t see the changes immediately, wait a few minutes and try again.

To validate your DNS settings, you can use the dig command.

This command queries DNS servers for information about a domain name.

Check your DNS settings with:

dig YOUR_DOMAIN_NAME  +noall +answer -t A
OptionDescription
+noallSuppresses or clear all display flags.
+answerDisplays only the answer section of the response.
-t ASpecifies the type of DNS record to query (in this case, A records).

Example:

dig escalopa.com +noall +answer -t A
escalopa.com.           3428    IN      A       185.199.108.153
escalopa.com.           3428    IN      A       185.199.111.153
escalopa.com.           3428    IN      A       185.199.109.153
escalopa.com.           3428    IN      A       185.199.110.153

If you have set up www CNAME, you can check it with:

dig www.YOUR_DOMAIN_NAME +noall +answer -t CNAME

Example:

dig www.escalopa.com +noall +answer -t CNAME
www.escalopa.com.       3600    IN      CNAME   escalopa.github.io.