3

I am hosting a site off of Amazon S3 and hence can't point the root record, ie: domain.com to an Alias. The www.domain.com points to the S3 endpoint.

Do I have to have a root record and does it have to be an A record?

4 Answers 4

7

Root records in DNS are the central DNS servers the world relies on to coordinate resolution. This has nothing to do with your server or DNS records.

I think what you're looking for is a Default Record, so that when people go to http://domain.com it brings up your site. Yes, Default Records have to be of type A (or AAAA for IPv6 addresses) in most DNS servers.

5
  • Ok thanks for clearing that up. Is it mandatory to have a default record?
    – Hilton D
    Apr 22, 2011 at 13:57
  • 2
    It's not common, but no, it's not mandatory.
    – zippy
    Apr 22, 2011 at 16:46
  • Is it possible to have multiple default records pointing to different IP addresses? Google apps allows you to forward domain.com to www.domain.com and therefore need to point domain.com to a list of IPs they give you.
    – Hilton D
    May 7, 2011 at 1:39
  • @Hilt86, yep, default records are just A records with the same name as the parent domain, and you can have multiple A records with the same name. This is of course dependent on the implementation, which will usually support this, but isn't required to (IIRC).
    – Chris S
    May 7, 2011 at 2:24
  • 1
    Thanks :) I really need to read the DNS & BIND book by O'Reilly
    – Hilton D
    May 8, 2011 at 8:19
1

There is a restriction that CNAMEs, which are the aliases, are only allowed to be by themselves and thus aren't allowed as a top-level domain record (because there is also an SOA record there). So, no you can't have an alias. But functionally a web browser will treat a CNAME and an A name the same way so it wouldn't help you in the end.

Your problem is that you need a web server to be running and acting as domain.com and then redirecting you to www.domain.com. That's actually what I'd suggest and what many sites do: The server that serves up this redirect doesn't need to be nearly as beefy as the www one.

1

I would agree with Chris S, but disagree with Wes, having just spent several hours unsucessfully trying to persuade Internet Explorer to redirect both the http:// and www prefixed variants of a domain name to a hostedbyamazon.co.uk domain.

  • Use of a www record and associated CNAME value in the DNS zone file works for when the domain is prefixed with www for both Internet Explorer and Firefox; however, whilst something along the lines of...

    RewriteCond %{HTTP_HOST} ^abc\.com [NC]
    RewriteRule ^.*$ abc.hostedbyamazon.co.uk [NC,R,L]
    

...works to make Firefox redirect non-www prefixed requests, absolutely nothing, including redirecting every request, works with Internet Explorer beyond the DNS controlled redirection of www.

As this is not an issue I have ever encountered previously with Internet Explorer, I have a strong suspicion that the issue is with there being no A record in the DNS zone file for the domain in question (necessary to avoid a nasty conflict with the NS records in the same zone file).

-3

.works to make Firefox redirect non-www prefixed requests, absolutely nothing, including redirecting every request, works with Internet Explorer beyond the DNS controlled redirection of www.

As this is not an issue I have ever encountered previously with Internet Explorer, I have a strong suspicion that the issue is with there being no A record in the DNS zone file for the domain in question (necessary to avoid a nasty conflict with the NS records in the same zone file).

You must log in to answer this question.

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