Custom apex domain and subdomain for two projects in the same organization

Given an organization with multiple project repos, say proj_docs and proj_website, would it be possible to have a custom apex domain point(via ALIAS or ANAME records) at proj_website while the subdomain docs points at proj_docs? Like:

ALIAS

example.com myorg.github.io/proj_website

CNAME

docs.example.com myorg.github.io/proj_docs

The only possible problem I’ve seen in Github’s documentation would be [the combination of a subdomain and apex domain.](http://ALIAS example.com myorg.github.io/proj_website CNAME docs.example.com myorg.github.io/proj_docs) I believe that only applies to a single github.io project (or main) site though.

1 Like

To my understanding, ALIAS records and CNAME records can only refer to another DNS record such as foo.bar.com, not a URL such as foo.bar.com/baz because the DNS system is designed to resolve names to IP addresses. So you could have an ALIAS record point from example.com to myorg.github.io but not myorg.github.io/proj_website. Similarly, a CNAME record could point from docs.example.com to myorg.github.io but not myorg.github.io/proj_docs.