I ran into a problem with my Namecheap DNS setup when I tried to point a domain to my Github Pages account and also handle email forwarding. Email just wouldn’t go through, even though the web redirection worked fine.
All of the checkboxes were checked for email forwarding, the email settings seemed right in the Namecheap control panel, but it just didn’t work.
The problem was that I had both the @ and www subdomains pointing to “barbeque.github.io.” using a CNAME (Alias) record. According to many sources, including github itself, this can break email, which it did. @ (the “top level”) simply cannot be a CNAME.
Warning: Do not create a CNAME record with your DNS provider for your custom apex domain! Doing so may cause issues with other services, such as email, on that domain.
Once the @ subdomain was changed to use the github pages IP address in an A-record (I used only 126.96.36.199, but this IP might change by the time you read this - check the help page for the IP addresses you should use), everything worked properly with both email and web.
Note that DNS can take awhile to update, and Namecheap email forwarding is sometimes slow, so don’t panic and go back and change a bunch of stuff if it doesn’t work immediately tomorrow.
Hopefully this helps with future uses of Namecheap (a great domain registrar) and Github Pages.