After a long research, I couldn't find any tutorial explaining how to setup a GitHub Page using SSL at registro.br. Hope the following is useful for you.
1. Setup your DNS at registro.br
Login to your registro.br account, and select the domain of your choice.
Under the DNS session, click "EDITAR ZONA".
Now add a new entry by filling the form with the following IP address:
Note that GitHub offers four different IP addresses. Just make sure your
A record points to one of the following IP addresses for HTTPS to work:
After saving, our records should look like this:
We're done at registro.br. Yay!
2. Setup a custom domain on GitHub
Inside your project, go to Settings > GitHub Pages session.
Fill the custom domain field with your domain. In our case navi.com.br.
After saving, our page should be visible at: http://navi.com.br
As a good practice, we now want to make sure every user connects to our website via HTTPS. It is important as it helps with SEO (i.e, how you rank on Google searchs) and as Google Chrome will soon block non-https websites.
So let's do this!
3. Enforce HTTPS
So pay attention. If you your "Enforce HTTPS" checkbox is not clickable, like in the image below, all you need to do is be patient!
Seriously. As I was trying to setup our account I couldn’t understand why HTTPS was not working. It was just a matter of time. Wait. Oh, and refresh the page. After a while the checkbox should become clickable.
We're now done. You can try to access http://navi.com.br (just click) and you should notice that GitHub is automatically using the HTTPS protocol. Nice!
[EXTRA] Redirect www to non-www
It's pretty simple but adds a nice touch to our domain. We are branded as navi.com.br, so let's redirect everyone from www to its non-www version.
Back to registro.br, just add a CNAME record point to non-www:
We finally ended up with:
And you are actually done.
Are you into productivity hot tips for web development? I’m a Brazilian full-stack developer, living and working in Paris, and I regularly share articles like the one you’ve just read. Follow me on twitter to stay tuned.