I have recently created a repository and I’ve been deploying it to github pages using the standard .yaml file from github actions, so far so good, I can access it through .github.io/repo-name however, I am trying to set up a custom subdomain to redirect it do the github paage. I have got the oneexample.com hosted zone in AWS Route 53 and I want to have the domain repo-name.oneexample.com to redirect it to gh pages but I cannot get it to work.
Most of the posts in the internet are using subdomains to route to base user pages, which Is not what I need. I have also read that I should need to wait for up to 24 hrs for the Route 53 DNS to propagate, but I also don’t believe that is the case as Route53 should propagate the DNS configs within 1 minute.
What I have tried so far:
Scenario 1:
- Setting A record on route53 from oneexample.com to the 4 IP’s mentioned on the github pages doc
- Setting CNAME from repo-name.oneexample.com to .github.io
- Adding repo-name.oneexample.com on the github page configuration on the repo settings.
Scenario 2:
- Setting CNAME from repo-name.oneexample.com to .github.io
- Adding repo-name.oneexample.com on the github page configuration on the repo settings.
- Creating CNAME file in the root of the repo with repo-name.oneexample.com on it.
Scenario 3:
- Setting A AND AAAA records on route53 from oneexample.com to the 4 IP’s mentioned on the github pages doc
- Adding oneexample.com on the github page configuration on the repo settings.
None of these worked, the thing is that I need a SUBDOMAIN (.oneexample.com) to resolve to a REPO GITHUB PAGE (.github.io/) and where my apex domain is oneexample.com.
I think the issue COULD BE the github actions, which is something I don’t quite have understanding on how it works but as the github page was deployed correctly at .github.io I presumed it might not interfere in the whole DNS resolving thing.
I have tried several configurations just like mentioned above.