Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames error when sending request from frontend to the server

0

Every time I try to send request from my frontend to the server, I am getting Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames error where hostname: <ALB-DNS-name> and certifcate's altnames: <example.com and *.example.com> and I can't seem to figure out what's causing this error.

Here is how my application is set up

  • frontend next.js app deployed on Vercel
  • domain is from Squarespace but it is using Route 53's custom Nameservers
  • Route 53 configured as domain service, connected to Vercel via CNAME and A record
  • ALB with certificate from ACM for my domain (example.com and *.example.com) attached and have listener on HTTPS:443 forwarding traffic to the target group
  • ECS running behind ALB

I think I am missing something very simple but I cannot figure out what it is. I would appreciate any help on this. Thank you!

1개 답변
0

There might be an incorrect DNS record causing your frontend to resolve the ALB DNS name to something that doesn't match the certificate and Your ALB might be configured to serve the wrong certificate, or misconfigured in the way it handles the traffic from your frontend.

As a solution

From the machine where your frontend runs (or if it's a web app, from your browser's developer tools), use nslookup <ALB-DNS-name> to verify that it resolves to the expected ALB address. In the AWS console, navigate to your ALB and its HTTPS:443 listener. Double-check that the certificate selected is the correct one for "example.com" and "*.example.com".

profile picture
전문가
답변함 2달 전
profile picture
전문가
검토됨 한 달 전
  • I don't see ALB DNS name anywhere in the network tab in browser's developer tool when sending request. I've double checked certificate in use as well as HTTPS listener for my ALB.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠