-1

I recently bought a .com domain (call it mydomain.com) from godaddy and I'm trying to make it so that whenever someone types in mydomain.com, their browser will load mydomain.github.io.

I've already added the necessary CNAME file to the github repo, now I just need to configure my godaddy settings. I go to add a CNAME zone record on my admin page on godaddy, and I'm presented with two fields:

1) Host

and

2) Points to

What would I put in each field to accomplish what I'm trying to do? I've tried multiple combinations of things but I can't seem to get it to update, even after a couple of hours of waiting around.

xcdemon05
  • 111
  • 1
  • 2
  • 3
    Did you actually read that article you linked to? It tells you what you need to use. Specifically see the links for with the names like 'Tips for configuring a ...' – Zoredache Jul 15 '14 at 23:08
  • 2
    You need to use an A record for domain.com and CNAME for www.domain.com – David Houde Jul 15 '14 at 23:08
  • @Zoredache the article says to point from mydomain.com to mydomain.github.io, but doing that causes an error. – xcdemon05 Jul 15 '14 at 23:28
  • An error from where? What is the exact message you see. Maybe if gave us some specific details about the problem you were having we could help. If you are going to ask a generic question devoid of specifics, you are going to get pointed to the generic instructions. – Zoredache Jul 15 '14 at 23:31
  • @Zoredache I apologize. I have literally no idea what I'm doing here. The error says a file with the name of @ already exists...? – xcdemon05 Jul 15 '14 at 23:32
  • 2
    Read DavidHoude's comment. Pay careful attention. Also go back and read the docs again. If you don't know what 'Apex domain', and 'Subdomain' means please take some time to search that. – Zoredache Jul 15 '14 at 23:40

2 Answers2

1

Based on the comments, I would like to clarify why exactly this isn't working for you. You are not allowed to use CNAME on apex domain due to conflict with SOA and NS records. You can use CNAME on sub domains (www, git, etc - As long as they have no other records) but for the domain itself, you will need to use an A record to point to the github IP address.

Per the GitHub setup guide found here, you should create A records with the following IP's:

192.30.252.153
192.30.252.154

RFC1912 section 2.4:

2.4 CNAME records

A CNAME record is not allowed to coexist with any other data. In
other words, if suzy.podunk.xx is an alias for sue.podunk.xx, you
can't also have an MX record for suzy.podunk.edu, or an A record, or
even a TXT record. Especially do not try to combine CNAMEs and NS
records like this!:

       podunk.xx.      IN      NS      ns1
                       IN      NS      ns2
                       IN      CNAME   mary
       mary            IN      A       1.2.3.4

This is often attempted by inexperienced administrators as an obvious way to allow your domain name to also be a host. However, DNS servers like BIND will see the CNAME and refuse to add any other resources for that name. Since no other records are allowed to coexist with a CNAME, the NS entries are ignored. Therefore all the hosts in the podunk.xx domain are ignored as well!

If you want to have your domain also be a host, do the following:

       podunk.xx.      IN      NS      ns1
                       IN      NS      ns2
                       IN      A       1.2.3.4
       mary            IN      A       1.2.3.4

Don't go overboard with CNAMEs. Use them when renaming hosts, but plan to get rid of them (and inform your users). However CNAMEs are
useful (and encouraged) for generalized names for servers -- ftp' for your ftp server, www' for your Web server, gopher' for your Gopher server, news' for your Usenet news server, etc.

Don't forget to delete the CNAMEs associated with a host if you
delete the host it is an alias for. Such "stale CNAMEs" are a waste
of resources.

David Houde
  • 3,200
  • 1
  • 16
  • 19
1

If HTTP 301 redirect is enough for you, you can tell GoDaddy to forward the domain to mydomain.github.io. Domain forwarding option can be found in GoDaddy's domain options.

You don't need to make any DNS zone changes for forwarding, GoDaddy will make those for you.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63