setting up your personal domain and email
Instructions to setup a custom domain and email addresses similar to this one.
-
Setup a user page on gitlab. This is very similar to github pages with the added benefit of being able to use any static site generator instead of being limited to jekyll.
This will create your static website at
https://<username>.gitlab.io
. -
Buy a domain (I used namecheap). This is the only step that costs $$.
-
Change your DNS servers to cloudflare.
-
Create DNS records and setup TLS certificates. In my case, I created
A
records for botharpankapoor.com
andwww.arpankapoor.com
. -
Setup DNSSEC. I was intermittently facing DNS resolution issues in certain regions before setting this up.
-
To redirect all
http
requests tohttps
, enableAlways use HTTPS
under theCrypto
tab on cloudflare. Also consider enablingAutomatic HTTPS Rewrites
. -
If you’d like to redirect
www
requests to the non-www
version, create a cloudflare page rule.I’ve setup
*www.arpankapoor.com/*
to permanently redirect (HTTP 301
) tohttps://arpankapoor.com/$2
. -
Setup your custom domain email addresses using Mailgun. It processes 10k messages per month for free, which is more than sufficient for my needs.
Thanks to gitlab, cloudflare and mailgun, you’ve now got your custom domain up and running with free hosting, TLS certificates and email!