Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mapsam
Last active June 11, 2023 11:59
Show Gist options
  • Star 45 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • 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

@scimetfoo
Copy link

scimetfoo commented Feb 9, 2017

How do I generate a CSR through github pages to activate my SSL cert on namecheap?

@montalvomiguelo
Copy link

@Murtaza0xFF you can not ... but you can do this

https://blog.cloudflare.com/tag/github-pages/

@nrathi
Copy link

nrathi commented Sep 21, 2017

@montalvomiguelo that link doesn't work anymore.

@simonzheng
Copy link

@ethamitc
Copy link

So if I understand this correctly, I'm supposed to have 2 CNAME aliases? if so they should be ethamitc.github.io and ethamitc.github.io/hiero?

@vedranmiletic
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.

@atreyhazelhispanic
Copy link

You will find what you need to know at these links:
https://blog.github.com/2018-05-01-github-pages-custom-domains-https/
In there is a link here, but will need these IPs
https://help.github.com/articles/setting-up-an-apex-domain/

@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