-1

[assume no use of route 53 in first 2 paragraphs]

So Amazon doesn't let you point a base domain towards an elb. How do most people solve this problem? I can assume the recommended answer is going to be to host your site off the 'www' prefix. And then what? Point your base domain to an ec2 instance running a web server and all it does it actuate a 301 redirect to www?

As for whether you can actually still use the base domain without the www, is there a possible option? Really the only limitation is the fact that the record needs to be an A and not CNAME.

And lastly, I believe Amazon does actually let you use CNAME on base if all your pieces are hosted on AWS and you can use some extra service they have. Is this also something common for businesses to choose?

5
  • 1
    "So Amazon doesn't let you point a base domain towards an elb." You've got that backwards. The RFCs don't let you do it. Amazon does let you do it, with Route53 and an ALIAS record.
    – ceejayoz
    Jun 17, 2015 at 2:36
  • Despite the question title of the dupe close target, the answer also covers the ELB case. Apex CNAMEs are RFC violations, and there is no solution for them within the DNS standard. Some DNS hosting companies provide custom solutions such as Route 53's ALIAS "record", which is not a real DNS record type. The reason why using an A record is bad is that you have no control over what Amazon will do with the IP address in the future, whereas the CNAME will always point where it needs to.
    – Andrew B
    Jun 17, 2015 at 2:55
  • @ceejayoz you're right; that's what i meant. I was more so curious as to how this is handled in the real world and apparently the answer is to either use amazon or use a server that supports it. This is surprising to me considering I assume that most don't support it.
    – derpy
    Jun 17, 2015 at 3:30
  • @derpy The RFCs were written long, long before cloud hosts like Amazon became popular, hence the need for workarounds like non-standard ALIAS records. Route53, being an Amazon product, can hook into their back-end systems to find the real IP of an ELB in a way other systems can't do as easily, hence why it's easier to do this from within the AWS ecosystem.
    – ceejayoz
    Jun 17, 2015 at 13:50

1 Answer 1

4

From Amazon's Route53 user guide:

Additionally, Amazon Route 53 supports the alias resource record set, which lets you map your zone apex (e.g. example.com) DNS name to your load balancer DNS name.

2
  • 1
    I would appreciate some answers on the assumption that route 53 is not being used.
    – derpy
    Jun 17, 2015 at 1:30
  • 2
    Other DNS providers support alias records. If yours doesn't, then you'll need to switch.
    – EEAA
    Jun 17, 2015 at 1:32

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