MEGAN RIEL-MEHAN
  • Home
  • Science Visualization
  • Research
    • Initial findings
    • Image processing
  • Civic Tech
  • Fine Art
  • News
  • Methods and Notes
  • CV and Resume

Deploying on gh-pages

8/7/2019

1 Comment

 
These are the steps to get certificates for both `www` subdomain and the apex domain. It's a bit of a workaround, and the certificates may expire in the long run, but it is the only way I found to get all the options I wanted:
  1. Both `www` and apex domain serve the same content. 
  2. Served over HTTPS
From this forum https://github.community/t5/GitHub-Pages/Does-GitHub-Pages-Support-HTTPS-for-www-and-subdomains/td-p/7116: GitHub doesn't currently support creating a certificate that covers both your root domain and your www subdomain. We only generate a certificate for the exact domain that you specify in the custom domain input box. ​
The other impetus for this is Github's recommendation that you use the www subdomain as the custom domain to take advantage of their CDN:
​We strongly recommend that you use a www subdomain for these reasons:
  • It gives your GitHub Pages site the benefit of our Content Delivery Network.
  • It is more stable because it is not affected by changes to the IP addresses of GitHub's servers.
  • Pages will load significantly faster because Denial of Service attack protection can be implemented more efficiently.

Warning: If your domain has HTTPS enforcement enabled, GitHub Pages' servers will not automatically route redirects. You must configure www subdomain and root domain redirects with your domain registrar.

1. Set up apex domain

1. Configure your custom domain using an A record with your DNS provider. Point to one of the following servers:
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
2. Add custom apex domain to github pages, eg `townhallmaine.org`
3. Wait for SSL certificate to be issued, and then click `Enforce HTTPS` in your GitHub options. 
Picture

2. Set up the www subdomain

1. Change the custom domain on github to the www subdomain. The url should continue to work, but now no longer served over HTTPS. 
Picture
2. Change the default CNAME record that used to point `www` to `@` to point `www` to <githubname>.github.io
Follow your DNS provider's instructions to create a CNAME record that points your subdomain to your default pages domain. For example, if you own the subdomain www.example.com, you can configure a CNAME record to point www.example.com to YOUR-GITHUB-USERNAME.github.io. DNS changes can take over a full day to update, and the wait varies among DNS and hosting providers.
3. Wait again for the certificate to be issued, then reselect `Enforce HTTPS`.
Now all 4 domains should work: 
  1. https://www.townhallmaine.org
  2. https://townhallmaine.org
  3. http://www.townhallmaine.org
  4. http://townhallmaine.org
1 Comment
Bisexual Bars Colorado link
10/21/2022 08:13:53 pm

Interesting thhoughts

Reply



Leave a Reply.

    Even though I no longer do bench work, I find the practice of recording "experiments" and notes to be helpful in keeping my thoughts and projects organized.  I also hope other people find useful things in here too. 

    Categories

    All
    Animation
    Cell Crawling
    HBV
    Heroku
    PGRN.org
    R
    Web Development

    RSS Feed

Download CV
Contact me:
  • Home
  • Science Visualization
  • Research
    • Initial findings
    • Image processing
  • Civic Tech
  • Fine Art
  • News
  • Methods and Notes
  • CV and Resume