weird ELB/Route 53 issue

  • I can load my IP address website

  • My ELB is in service

  • ELB A Recored gives 500-internal server error.

  • I can load hosted zone A record name trololol.tech

  • Hosted zone A record name www.trololol.tech give 500-internal server error.

  • Both are pointed to the same ELB

  • This all worked until a few days ago

  • Cloudfront gives 500 - internal server error


Related discussions:

Using a Amazon AMI EC2 Instance configured running an Lamp web server

  • I can load my IP address website
  • My ELB is in service
  • ELB A Record loads
  • I can load Hosted Zone A record name trololol.tech
  • Hosted zone A record name www.trololol.tech give 500-internal server error.
  • Both are pointed to the same ELB
  • Cloudfront works for loading an image stored on the ec2 instance

Worked it all out

Permissions on IIS caused the 500 error which if they were correct, would have alerted me to the fact that I forgot to include part of the web address. dumb.

This isn’t an “issue” with your ELB or route 53.

You’ve either set something incorrectly on your ELB or R53 configuration or your web server / app has a problem.

ELB can’t return 500’s by itself, they must come from the servers behind it. Here are the HTTP errors an ELB can generate itself: https://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/ts-elb-error-message.html

Is your domain still resolving to your ELB? You’re using an ALIAS record right? You didn’t manually set up something pointing to the ELB IPs and now you’re actually pointing to an IP that no longer belongs to you?

Essentially, what I’m asking here is are you seeing these requests come through on your web server logs? Have you checked your logs for any reason as to why your server is returning 500 internal server errors?

Don’t use A records when using ELBs, it says so right in the console. It’s likely your ELBs ip has changed and now you are getting someone elses ELB.

In Route 53, ALIAS is a setting of an A record type. So you’re not quite on the right track there.

You’re right in a way and it’s good to mention but more info was required to get to the bottom of this.

use cnames

No. That’s a terrible idea.

  1. If you’re using Route 53, ALIAS records should be used because this is exactly the use case that they’re intended for, and queries to ALIAS records are free where CNAMEs are not (https://aws.amazon.com/route53/pricing/)

  2. CNAME to the zone apex is an illegal implementation per the related RFCs and are generally not supported. Anything that supports this goes against the standard.

we create a cname in our zone space, to the elb dns record - this is set up via cloud formation and ensures if the stack is ever re-created, the record is pointing to the correct elb. never said anything about the zone apex. this is for externally accessible records.

Sigh, yes technically it’s an A record, but AWS does dynamic updates of it behind the scenes with regards to CF distributions, ELBS or S3 static hosting targets.

Because the set of IP addresses associated with a LoadBalancer can change over time, you should never create an “A” record with any specific IP address. If you want to use a friendly DNS name for your load balancer instead of the name generated by the Elastic Load Balancing service, you should create a CNAME record for the LoadBalancer DNS name, or use Amazon Route 53 to create a hosted zone. For more information, see

You can’t really setup an ELB (unless you are using CLI/API I guess… but then you should be familiar with this caveat anyway) without reading this.

I think you just confirmed exactly what I said?

CNAME should only be used if you’re using something other than R53, which this guy is not. He should be using a A record with an ALIAS target. Saying “don’t use A records” for an ELB when using R53 isn’t really correct and you should clarify that, which is what I did.

I was talking about A records outside of R53… as in standard DNS where A-ALIAS records don’t exist (unless you code something yourself I guess, like AWS has done)

You still haven’t told me why you’re using CNAMEs. Nothing in your explanation is any sort of justification.

You should be using A ALIAS records for this, because then you don’t get charged for the name resolution. The zone apex thing is just because it’s good practice if you have them available, because they CAN be used for a zone apex if necessary, where CNAMEs can not.

Then it would have been good of you to provide context. You told a guy using Route 53 not to use A records and didn’t mention anything about using DNS other than Route 53. OP stated that they’re using Route 53 so your advice wasn’t correct in the context of this thread and needed further clarification.

we do it because ip’s change so a records can become innaccurate.

are you talking about alias resource record sets?

i have never used the little alias tick box - til, thanks!

Yes, the ALIAS box. It allows you to select a resource as the target, such as an ELB or CloudFront distribution. Resolving ALIAS records are free where you get charged for CNAMEs.

No problem :).