Github allows to serve content for a custom domain from user's repository.
Documentation describes how to configure www subdomain, and it also describes how to configure apex domain, like example.com
But how to configure both?
This is the documentation:
https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site
I configured apex domain and it works, but I can't configure www subdomain, it fails with DNS_PROBE_FINISHED_NXDOMAIN, site can't be reached.
I tried to create CNAME record to redirect www request, but it doesn't work.
Redirecting www to apex doesn't work.
Redirecting www to username.github.io also doesn't work.
What would be the right way to configure DNS so that Github's pages serve both www subdomain and apex domain?
I went through some answers here and on the web. And found some suggestions using ALIAS, my provider doesn't support ALIAS. Do I have to switch provider or is there another solution?
EDIT:
I'm adding information as requested in comments
Domain http://www.halza.de redirects to halzade.github.io
dns config:
I added cname for www with value halza.de. With dot at the end.
A
entry for the apex, and aCNAME
for the subdomain should be all what is needed to make things work. That is all on the DNS side, and then the rest is a matter of the website getting requests. Which is basically what the section "Configuring an apex domain and the www subdomain variant" on the link you gave says, so hard to know exactly your problem with so little details in your question.