0
votes

I am trying to host a custom subdomain with Github Pages.

My apex domain (http://example.com) is pointing to a custom server (not Github Pages).

I am trying to get a subdomain of this (http://subdomain.example.com) to host a Github Pages site off a project page.

I have created a CNAME record for the subdomain pointing to http://username.github.io but it comes up with this error:

Your site's DNS settings are using a custom subdomain, subdomain.example.com, that's set up as an A record. We recommend you change this to a CNAME record pointing at [YOUR USERNAME].github.io. For more information, see https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/.

I have also tried moving the project to its own Github organisation and pointing the CNAME to organisationname.github.io but it has the same result.

In both instances I have waited 24 hours for the DNS to propagate.

I have tried following the official tutorials and searching in StackOverflow for answers but have not been able to find anything for this situation.

Is this even possible to do or do the A records for my http://example.com domain affect all the subdomains below it?

1

1 Answers

0
votes

Found a solution with Github support.

Turns out the answer is yes you can. I just had my apex domain configured to use Cloudflare and totally forgot about it. I made the changes described in my original post in Cloudflare and it all worked fine.