Skip to content

Instantly share code, notes, and snippets.

@mapsam
Last active June 11, 2023 11:59
Show Gist options
  • Save mapsam/ce60b87eea561ea6bdbf to your computer and use it in GitHub Desktop.
Save mapsam/ce60b87eea561ea6bdbf to your computer and use it in GitHub Desktop.
Namecheap > Github pages

Namecheap > Github pages

Pointing your domains to a gh-pages branch requires three steps.

  1. Add the Github IPs as A records on Namecheap.
    185.199.108.153
    185.199.109.153
    185.199.110.153
    185.199.111.153

  2. Add your Github domain as the CNAME alias on Namecheap. your_username.github.io. (mind the extra period!)

  3. Add a CNAME with your new domain name in your repository. lowercase and nothing else

@BibleFarm
Copy link

Hi everybody,

First of all, thanks to y'a;ll for the valuable info :)

Quick question, may someone can think of what I may be doing wrong:

I've followed all the steps to get my repo: https://github.com/BibleFarm/cali to resolve to the custom domain calioviedo.com

It worked right away (within minutes), so that was cool.

Typing on the address bar in browsers, all of these ways work fine:
--> calioviedo.com
--> www.calioviedo.com
--> http://calioviedo.com
--> http://www.calioviedo.com
--> https://calioviedo.com

But I can't get this one to work:
--> https://www.calioviedo.com

Please see image attached.

Thanks!

Alex

your_connection_is_not_private

@mefrem
Copy link

mefrem commented Oct 21, 2019

@BibleFarm -- it looks like you got your subdomain www.calioviedo.com to direct to the apex domain calioviedo.com

What did you do?

@tyoc213
Copy link

tyoc213 commented Jan 6, 2020

This is not correct anymore. Instead of 192.30.252.153 and 192.30.252.154, the IPs should be 185.199.108.153, 185.199.109.153, 185.199.110.153 and 185.199.111.153.

How you know that?? where is the link? to me it seems that github is only supporting now CNAME records... because they provide the HTTPS SSL.

@chenpy228
Copy link

This is not correct anymore. Instead of 192.30.252.153 and 192.30.252.154, the IPs should be 185.199.108.153, 185.199.109.153, 185.199.110.153 and 185.199.111.153.

How you know that?? where is the link? to me it seems that github is only supporting now CNAME records... because they provide the HTTPS SSL.

You can see the links below.
https://help.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain

@Adarshreddyash
Copy link

This is not correct anymore. Instead of 192.30.252.153 and 192.30.252.154, the IPs should be 185.199.108.153, 185.199.109.153, 185.199.110.153 and 185.199.111.153.
These should work! If not delete your CNAME for an hour and add again.

@mapsam
Copy link
Author

mapsam commented Jul 6, 2020

Updated IP addresses in the original post to reflect the latest recommendations from GitHub ✅

@ppalone
Copy link

ppalone commented Feb 10, 2021

What if I have an app like username.github.io/myapp
Will setting the CNAME to username.github.io/myapp work?

@palmerabollo
Copy link

@ppalone No, it won't work.

@H4YWYRE
Copy link

H4YWYRE commented Dec 4, 2021

I tried using name cheap for the DNS and the custom domain name but I get a white screen with only the title of my website.

@LogicKahanHai
Copy link

How to get CSR from github pages for Namecheap domain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment