-
-
Save notTag/4a60598d018124c9ac4a7b1f3e2bac9a to your computer and use it in GitHub Desktop.
| #---------------GitHub Pages + Namecheap Domain + SSL Cheat Sheet------------# | |
| NOTE: You do NOT need to buy PositiveSSL from Namecheap. | |
| GitHub Pages provides free SSL automatically via Let's Encrypt. | |
| # Namecheap Domain Setup | |
| Buy Domain | |
| Go to namecheap.com, select and buy domain name. | |
| Navigate to DNS Settings | |
| Login to Namecheap → Username dropdown → Dashboard | |
| Go to DomainList | |
| Click Manage button | |
| Click Advanced DNS tab | |
| Add DNS Records | |
| Click "Add Record" and add the following: | |
| A Records (point root domain to GitHub Pages IPs) | |
| Type: A Record | Host: @ | Value: 185.199.108.153 | TTL: Automatic | |
| Type: A Record | Host: @ | Value: 185.199.109.153 | TTL: Automatic | |
| Type: A Record | Host: @ | Value: 185.199.110.153 | TTL: Automatic | |
| Type: A Record | Host: @ | Value: 185.199.111.153 | TTL: Automatic | |
| CNAME Record (point www subdomain to your Pages site) | |
| Type: CNAME Record | Host: www | Value: yourusername.github.io | TTL: Automatic | |
| # GitHub Repo Setup | |
| Add CNAME File | |
| Add a CNAME file to the root of your GitHub repo containing only your domain name. | |
| yourdomain.com | |
| Configure GitHub Pages | |
| In your GitHub repo go to Settings → Pages | |
| Set your custom domain and save | |
| # Enable HTTPS | |
| Wait for DNS propagation (up to 24 hours) | |
| Check "Enforce HTTPS" in Settings → Pages | |
| GitHub will automatically provision a free TLS cert via Let's Encrypt once DNS resolves. | |
| The "Enforce HTTPS" checkbox will be greyed out until this happens. |
Respect... all the way.
Thank You
Still works. Thank you! I've been trying to get this set up for several days now. The note to add the '.' to the end of the CNAME value is one that I didn't see anywhere else.
As others are saying, github has updated the IP addresses used for the A records. I set mine up like this.
At first, I did get a privacy warning (not using https) when trying to access the site via the apex domain, but not using the subdomain (www.). After waiting about 30 mins that issue resolved itself.
Thank you, you're a legend.
I cannot make it to enforce HTTPS, anyone can help?
Thank you!
I cannot make it to enforce HTTPS, anyone can help?
Somewhat similarly, I'm not able to access the website without typing in www before the domain. If I just go to the domain without anything in the front or with https:// then it won't connect.
Has anyone else had this issue?
Thank youu
I have the same issue there is just a blank screen being shown nothing else except the title
After 9 years, I updated this sheet 😂 . It includes the updated IPs and updated processes for configuring your Namcheap domain with github pages. I also added a note on how to set up your page with ssl for improved security. I hope y'all have grown tremendously in your cs careers and personal tech proficiencies. See you in another 9 years?

Merci!