GitHub Pages and DNS Records

I want to have my new site located at GitHub Pages, but unfortunately I've been using an email account with the domain I want to point to GitHub.

So, I have this paid hosting where I'm receiving my emails, my domain name registered at GoDaddy, and I want to keep it that way. I just need to have the Website content located at GitHub.

How would I change the DNS Records so this setup works? That is, domainname.com and all its subdomains pointing at GitHub, but I would still be able to receive my emails, because they are located at my paid hosting.

Thanks!

PS: According to GitHub Pages article, I need to change the A record to the IP they give me, but I don't know how to do the email setup.


Solution 1:

You need to set the A record of your domain to GitHub-IP and the MX Record to your e-mail Provider.

Example:

domainname.com IN A 207.97.227.245
domainname.com in MX 10 <name of your e-mail providers server>

This should be all to do.