-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?

derpy
  • 31
  • 7
  • 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 '15 at 02:36
  • Despite the question title of the dupe close target, the answer also covers the ELB case. [Apex CNAMEs are RFC violations](http://serverfault.com/q/613829/152073), 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 '15 at 02: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 '15 at 03:30
  • http://serverfault.com/q/576461/126632 – Michael Hampton Jun 17 '15 at 03:39
  • @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 '15 at 13:50

1 Answers1

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.

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