Hossain, I read your article on how to use a custom domain for GitHub Pages and I am using it for my websites.
It works mostly good for a minor exception. When trying to access the site with https://www. https://www.hossainkhan.com/ the browser shows a big warning. At least Firefox. This is part of the message:
Warning: Potential Security Risk Ahead
Firefox detected a potential security threat and did not continue to www.hossainkhan.com. If you visit this site, attackers could try to steal information like your passwords, emails, or credit card details.....
Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for www.hossainkhan.com. The certificate is only valid for the following names: www.github.com, *.github.io, *.githubusercontent.com, *.github.com, github.com, github.io, githubusercontent.com
Error code: SSL_ERROR_BAD_CERT_DOMAIN
I have the same problem and I didn't find the solution yet. GitHub Pages documentation on how to do this is not clear. Already contacted GitHub support 1 day ago but no answer yet. Maybe changing the repository to xxxx.github.io?