0

I purchased a domain and want to associate it with a github.io url. I'm having difficulties configuring my DNS for the custom domain to point to the Github domain.

In the github documentation it says "you must configure an ALIAS, ANAME, or A record with your DNS provider."

Amazon Route 53 seems to only have the A record so I need to use that. The problem is that A records seem to only take an IP address. I have been unable to find a correct ip that correlates with my github.io url.

I ran a dig command to get the ip and it gives me an ip. When I visit this ip however it 404s.

I have also used the host command and sites that lookup ip addresses but they all give me the same 404ing ip

1 Answer 1

1

I ran a dig command to get the ip and it gives me an ip. When I visit this ip however it 404s.

That's to be expected. Github has not allocated an IP address just for your site -- the web browser sends a Host: header with each request to tell the web server which site is being requested. Typing the IP address into the browser causes the IP address to be sent, so the server has no idea which of millions of possible sites you want.

Use this address, and create a normal A record. Your site should work fine.

Route 53 does have Alias records, but this is only relevant when the target is another AWS service, like S3, CloudFront, or Elastic Load Balancer.

4
  • Use what address?
    – chackerian
    Commented Jul 17, 2016 at 11:32
  • Whatever address you were talking about that gives 404s. Commented Jul 17, 2016 at 15:32
  • I was confused before because I thought this address wouldn't work since it was 404ing. I guess it works differently in DNS records.
    – chackerian
    Commented Jul 27, 2016 at 1:03
  • No... the site examines the HTTP Host header, sent by the browser and populated with the address shown in the address bar to decide which site you are asking for. That's generally how web servers work, and the only way they can work at all when more than one hostname points to the same IP address. When it sees that header populated with an IP address, it's going to respond with some kind of error, because it has no idea which site you actually want. Github chooses to return 404 but a number of other errors like 503 Service Unavailable or 403 Forbidden would also be valid in this case. Commented Jul 27, 2016 at 3:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .