How to change root entry to CNAME for github pages?

I am trying to move from NameCheap to DigitalOcean. My DNS is Currently, in NameCheap I have setup as a CNAME to

$ dig

When trying to do the same thing in DigitalOcean, I cannot change to CNAME because @ seems to be invalid.

Is this a known problem? Perhaps, it is not possible to setup a root as CNAME but then why is it working on NameCheap.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I’m sure you’ve found an answer for this already - but I’m leaving this here for anyone looking here in the future.

The best available solution is CloudFlare, it’s a free DNS service that offers “CNAME Flattening” which allows you to place CNAME records at the apex/root of the domain.

They also provide free SSL which is nice.

Hmm. Well that’s a bummer. I created an ticket for DO. If they don’t provide a solution, I’ll have to leave it at NameCheap for now.


Since DigitalOcean doesn’t support ALIAS or ANAME records (as far as I can see), which is required by GitHub in order to setup your domain if you want to route the domain itself, then you may have to fall back to your default registrars DNS and use them (if they support it).

The only other way would be to use an A entry and point that entry to the IP used by your page. The downside to this is, unlike ALIAS and ANAME entries, if GitHub changes their IP, you have to do the same, otherwise your page won’t display.

I’ve honestly not seen too many providers that do allow such entries though, so it’s not just a limitation here at DigitalOcean.

You could, of course, use a sub-domain and use a CNAME to point it, but as far as the actual domain and only the domain, you need a way to use those entries and DigitalOcean currently does not allow them to be setup from the control panel.