Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active October 24, 2025 17:44
Show Gist options
  • Save plembo/84f80c920bb5ac6f19e53fe6f8db1ff7 to your computer and use it in GitHub Desktop.
Save plembo/84f80c920bb5ac6f19e53fe6f8db1ff7 to your computer and use it in GitHub Desktop.

Revisions

  1. plembo revised this gist Aug 10, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -38,7 +38,7 @@ youracctname.github.io. 3600 IN A 185.199.109.153

    3. In the GitHub repo config for Pages (Settings... Pages), enter your apex domain, "example.com" (not "www.example.com") in the "Custom Domain" box.

    4. Wait for GitHub to generate ahd install the SSL certificate for that apex domain (at least an hour).
    4. Wait for GitHub to generate and install the SSL certificate for that apex domain (at least an hour).

    5. Test by going to "https://example.com" and "https://www.example.com".

  2. plembo revised this gist Sep 11, 2021. 1 changed file with 7 additions and 5 deletions.
    12 changes: 7 additions & 5 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -10,11 +10,13 @@ So here's my recipe for using a custom domain with GitHub pages where Namecheap

    1. Create A records for apex domain in Namecheap Advanced DNS panel for the domain(in this example, the fictional "example.com"):

    * A record for @ pointing to 185.199.108.15
    * A record for @ pointing to 185.199.109.153
    * A record for @ pointing to 185.199.110.153
    * A record for @ pointing to 185.199.111.153
    * CNAME record pointing to youracctname.github.io
    |Record Type|Host|Address|TTL|
    |-----------|----|-------|----|
    |A Record| @ | 185.199.108.153 | 30 minutes|
    |A Record| @ | 185.199.109.153 | 30 minutes|
    |A Record| @ | 185.199.110.153 | 30 minutes|
    |A Record| @ | 185.199.111.153 | 30 minutes|
    |CNAME Record| www | youracctname.github.io | 30 minutes|

    2. Wait an hour, then test if DNS is set up properly:
    ```
  3. plembo revised this gist Sep 11, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Using GitHub Pages with a custom domain: Namecheap Edition
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.

    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe [1](#fn1).
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe [[1](#fn1)].

    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

  4. plembo revised this gist Sep 11, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Using GitHub Pages with a custom domain: Namecheap Edition
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.

    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe [1] .
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe [1](#fn1).

    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

    @@ -43,7 +43,7 @@ youracctname.github.io. 3600 IN A 185.199.109.153
    I highly recommend _not_ changing domain registrars and DNS providers in the middle of all that.

    ## Notes
    [1]: The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings). Even with shorter TTLs, you need to anticipate upwards of an hour delay between changes. So chill. Read a book. Talk to the dog.
    <a class="anchor" id="fn1">[1]</a> The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings). Even with shorter TTLs, you need to anticipate upwards of an hour delay between changes. So chill. Read a book. Talk to the dog.

    ## Further Reading
    "Configuring a custom domain for your GitHub Pages site". _GitHub Docs_, https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site, Retrieved 9 September 2021.
  5. plembo revised this gist Sep 11, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Using GitHub Pages with a custom domain: Namecheap Edition
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.

    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe <a href="#fn1" id="fn1">[1]</a>.
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe [1] .

    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

    @@ -43,7 +43,7 @@ youracctname.github.io. 3600 IN A 185.199.109.153
    I highly recommend _not_ changing domain registrars and DNS providers in the middle of all that.

    ## Notes
    <a id="fn1" href=#fn1>[1]</a> The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings). Even with shorter TTLs, you need to anticipate upwards of an hour delay between changes. So chill. Read a book. Talk to the dog.
    [1]: The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings). Even with shorter TTLs, you need to anticipate upwards of an hour delay between changes. So chill. Read a book. Talk to the dog.

    ## Further Reading
    "Configuring a custom domain for your GitHub Pages site". _GitHub Docs_, https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site, Retrieved 9 September 2021.
  6. plembo revised this gist Sep 11, 2021. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Using GitHub Pages with a custom domain: Namecheap Edition
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.

    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe<a href="#fn1" id="fn1">[1]</a>.
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe <a href="#fn1" id="fn1">[1]</a>.

    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

    @@ -42,9 +42,10 @@ youracctname.github.io. 3600 IN A 185.199.109.153

    I highly recommend _not_ changing domain registrars and DNS providers in the middle of all that.

    ## Notes
    <a id="fn1" href=#fn1>[1]</a> The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings). Even with shorter TTLs, you need to anticipate upwards of an hour delay between changes. So chill. Read a book. Talk to the dog.

    ## References
    ## Further Reading
    "Configuring a custom domain for your GitHub Pages site". _GitHub Docs_, https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site, Retrieved 9 September 2021.

    "How do I link my domain to GitHub Pages". _Namecheap Knowledgebase_, https://www.namecheap.com/support/knowledgebase/article.aspx/9645/2208/how-do-i-link-my-domain-to-github-pages/, Retrieved 10 September 2021.
  7. plembo revised this gist Sep 11, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Using GitHub Pages with a custom domain: Namecheap Edition
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.

    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe [1].
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe<a href="#fn1" id="fn1">[1]</a>.

    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

    @@ -42,7 +42,7 @@ youracctname.github.io. 3600 IN A 185.199.109.153

    I highly recommend _not_ changing domain registrars and DNS providers in the middle of all that.

    [1] The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings). Even with shorter TTLs, you need to anticipate upwards of an hour delay between changes. So chill. Read a book. Talk to the dog.
    <a id="fn1" href=#fn1>[1]</a> The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings). Even with shorter TTLs, you need to anticipate upwards of an hour delay between changes. So chill. Read a book. Talk to the dog.

    ## References
    "Configuring a custom domain for your GitHub Pages site". _GitHub Docs_, https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site, Retrieved 9 September 2021.
  8. plembo revised this gist Sep 11, 2021. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Using GitHub Pages with a custom domain: Namecheap Edition
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.

    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe. The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings). Even with shorter TTLs, you need to anticipate upwards of an hour delay between changes. So chill. Read a book. Talk to the dog.
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe [1].

    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

    @@ -42,6 +42,8 @@ youracctname.github.io. 3600 IN A 185.199.109.153

    I highly recommend _not_ changing domain registrars and DNS providers in the middle of all that.

    [1] The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings). Even with shorter TTLs, you need to anticipate upwards of an hour delay between changes. So chill. Read a book. Talk to the dog.

    ## References
    "Configuring a custom domain for your GitHub Pages site". _GitHub Docs_, https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site, Retrieved 9 September 2021.

  9. plembo revised this gist Sep 11, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    # Using GitHub Pages with a custom domain: Namecheap Edition
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe. The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings).

    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe. The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings). Even with shorter TTLs, you need to anticipate upwards of an hour delay between changes. So chill. Read a book. Talk to the dog.

    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

  10. plembo revised this gist Sep 11, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Using GitHub Pages with a custom domain: Namecheap Edition
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe.
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe. The other problem is how damned long it takes for things to propagate across global DNS, especially when starting with TTLs of an hour (the trick is to try reducing your TTL before making any other changes, going from an hour to fifteen minutes can make a huge difference in blood pressure readings).

    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

  11. plembo revised this gist Sep 11, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -33,9 +33,9 @@ youracctname.github.io. 3600 IN A 185.199.110.153
    youracctname.github.io. 3600 IN A 185.199.109.153
    ```

    3. In GitHub repo config for Pages (Settings... Pages), enter your apex domain, "example.com" (not "www.example.com") in the "Custom Domain" box.
    3. In the GitHub repo config for Pages (Settings... Pages), enter your apex domain, "example.com" (not "www.example.com") in the "Custom Domain" box.

    4. Wait for Github to generate ahd install the SSL certificate for that apex domain (at least an hour).
    4. Wait for GitHub to generate ahd install the SSL certificate for that apex domain (at least an hour).

    5. Test by going to "https://example.com" and "https://www.example.com".

  12. plembo revised this gist Sep 11, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ Although you'd think the simplest setup would be to merely configure for the sub
    ## Procedure
    So here's my recipe for using a custom domain with GitHub pages where Namecheap is the DNS provider:

    1. Create A records for apex domain in Namecheap Advanced DNS panel for the domain(in this example, the fictional "example.com"):
    1. Create A records for apex domain in Namecheap Advanced DNS panel for the domain(in this example, the fictional "example.com"):

    * A record for @ pointing to 185.199.108.15
    * A record for @ pointing to 185.199.109.153
  13. plembo revised this gist Sep 11, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe.

    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my case using the apex domain (https://example.com) resulted in fewer complications.
    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

    ## Procedure
    So here's my recipe for using a custom domain with GitHub pages where Namecheap is the DNS provider:
  14. plembo revised this gist Sep 11, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,8 @@
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe.

    Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my case using the apex domain (https://example.com) resulted in fewer complications.

    ## Procedure
    So here's my recipe for using a custom domain with GitHub pages where Namecheap is the DNS provider:

  15. plembo revised this gist Sep 11, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -41,3 +41,5 @@ I highly recommend _not_ changing domain registrars and DNS providers in the mid

    ## References
    "Configuring a custom domain for your GitHub Pages site". _GitHub Docs_, https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site, Retrieved 9 September 2021.

    "How do I link my domain to GitHub Pages". _Namecheap Knowledgebase_, https://www.namecheap.com/support/knowledgebase/article.aspx/9645/2208/how-do-i-link-my-domain-to-github-pages/, Retrieved 10 September 2021.
  16. plembo revised this gist Sep 11, 2021. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -7,11 +7,11 @@ So here's my recipe for using a custom domain with GitHub pages where Namecheap

    1. Create A records for apex domain in Namecheap Advanced DNS panel for the domain(in this example, the fictional "example.com"):

    * A record for @ pointing to 185.199.108.15
    * A record for @ pointing to 185.199.109.153
    * A record for @ pointing to 185.199.110.153
    * A record for @ pointing to 185.199.111.153
    * CNAME record pointing to youracctname.github.io
    * A record for @ pointing to 185.199.108.15
    * A record for @ pointing to 185.199.109.153
    * A record for @ pointing to 185.199.110.153
    * A record for @ pointing to 185.199.111.153
    * CNAME record pointing to youracctname.github.io

    2. Wait an hour, then test if DNS is set up properly:
    ```
  17. plembo revised this gist Sep 11, 2021. 1 changed file with 7 additions and 8 deletions.
    15 changes: 7 additions & 8 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -5,14 +5,13 @@ The main problem for me was a lack of concrete configuration examples. That's no
    ## Procedure
    So here's my recipe for using a custom domain with GitHub pages where Namecheap is the DNS provider:

    1. Create A records for apex domain in Namecheap Advanced DNS panel for domain:
    ```
    - A record for @ pointing to 185.199.108.153
    - A record for @ pointing to 185.199.109.153
    - A record for @ pointing to 185.199.110.153
    - A record for @ pointing to 185.199.111.153
    - CNAME record pointing to youracctname.github.io
    ```
    1. Create A records for apex domain in Namecheap Advanced DNS panel for the domain(in this example, the fictional "example.com"):

    * A record for @ pointing to 185.199.108.15
    * A record for @ pointing to 185.199.109.153
    * A record for @ pointing to 185.199.110.153
    * A record for @ pointing to 185.199.111.153
    * CNAME record pointing to youracctname.github.io

    2. Wait an hour, then test if DNS is set up properly:
    ```
  18. plembo revised this gist Sep 11, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,7 @@ youracctname.github.io. 3600 IN A 185.199.110.153
    youracctname.github.io. 3600 IN A 185.199.109.153
    ```

    3. In GitHub repo config for Pages (Settings... Pages), enter your apex domain, "example.com" (not "www.example.com") in the "Custom Domain" window.
    3. In GitHub repo config for Pages (Settings... Pages), enter your apex domain, "example.com" (not "www.example.com") in the "Custom Domain" box.

    4. Wait for Github to generate ahd install the SSL certificate for that apex domain (at least an hour).

  19. plembo revised this gist Sep 11, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,7 @@ example.com. 1800 IN A 185.199.111.153
    ```

    ```
    me@myhost:~$ dig +noall +answer +nocmd www.example.com.
    me@myhost:~$ dig +noall +answer +nocmd www.example.com
    www.example.com. 1800 IN CNAME youracctname.github.io.
    youracctname.github.io. 3600 IN A 185.199.108.153
    youracctname.github.io. 3600 IN A 185.199.111.153
  20. plembo revised this gist Sep 11, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,7 @@ example.com. 1800 IN A 185.199.110.153
    example.com. 1800 IN A 185.199.109.153
    example.com. 1800 IN A 185.199.108.153
    example.com. 1800 IN A 185.199.111.153
    ```

    ```
    me@myhost:~$ dig +noall +answer +nocmd www.example.com.
  21. plembo created this gist Sep 11, 2021.
    43 changes: 43 additions & 0 deletions ghpwithnamecheap.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    # Using GitHub Pages with a custom domain: Namecheap Edition
    As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.
    The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe.

    ## Procedure
    So here's my recipe for using a custom domain with GitHub pages where Namecheap is the DNS provider:

    1. Create A records for apex domain in Namecheap Advanced DNS panel for domain:
    ```
    - A record for @ pointing to 185.199.108.153
    - A record for @ pointing to 185.199.109.153
    - A record for @ pointing to 185.199.110.153
    - A record for @ pointing to 185.199.111.153
    - CNAME record pointing to youracctname.github.io
    ```

    2. Wait an hour, then test if DNS is set up properly:
    ```
    me@myhost:~$ dig +noall +answer +nocmd example.com
    example.com. 1800 IN A 185.199.110.153
    example.com. 1800 IN A 185.199.109.153
    example.com. 1800 IN A 185.199.108.153
    example.com. 1800 IN A 185.199.111.153
    ```
    me@myhost:~$ dig +noall +answer +nocmd www.example.com.
    www.example.com. 1800 IN CNAME youracctname.github.io.
    youracctname.github.io. 3600 IN A 185.199.108.153
    youracctname.github.io. 3600 IN A 185.199.111.153
    youracctname.github.io. 3600 IN A 185.199.110.153
    youracctname.github.io. 3600 IN A 185.199.109.153
    ```
    3. In GitHub repo config for Pages (Settings... Pages), enter your apex domain, "example.com" (not "www.example.com") in the "Custom Domain" window.
    4. Wait for Github to generate ahd install the SSL certificate for that apex domain (at least an hour).
    5. Test by going to "https://example.com" and "https://www.example.com".
    I highly recommend _not_ changing domain registrars and DNS providers in the middle of all that.
    ## References
    "Configuring a custom domain for your GitHub Pages site". _GitHub Docs_, https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site, Retrieved 9 September 2021.