How to change root entry to CNAME for github pages?

January 28, 2017 272 views

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.

3 Answers


Different DNS providers use and allow different data to be input when creating/modifying DNS.

For DigitalOcean, you need to enter in an actual hostname in the first input box, or a short name. For example:

@    43200

... would not be valid as a CNAME, but    43200

... would be. You simply need to drop the @ and replace it with your actual domain if you're going to use DigitalOcean's DNS manager.

  • @jtittle thanks for the response. I don't think this works. Maybe I am doing something wrong. I can't upload a screenshot but when I try I see the preview as Here is a screenshot.

    Also, I get the following error when trying to save.

    "Cname records cannot share a name with other records."


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.

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.

Have another answer? Share your knowledge.