Background of the Application
- I have MERN Stack Application running (where frontend reactJS is running inside NodeJS backend server)
- The whole application is then wrapped inside Docker Container
- Then Deployed in AWS ECS EC2 (using single Service & Task) behind a single Application Load Balancer.
- Created a Hosted Zone in AWS Route 53 to Point my domain name to Load Balancer
- Now the application is successfully running when I visit my domain name.
Problem Araised Here
- The website is "Not Secure"!! — I want to install SSL Certificate
- I went to AWS Certificate Manager
- Successfully got a certificate by adding CNAME in the AWS Hosted Zone Records
- Configured Security Group, Load balancer Listeners to HTTPS
- Added that Certificate to Load Balancer listener
Actual Problem
- I got the certificate, connected to load balancer,
- I can see my certificate in the address bar - "Certificate is Valid"
- And still, it shows my the Site is "Not Secure" - Below image is for your reference.
Error in the Console (Edited)
Mixed Content: The page at 'https://example.com/' was loaded over HTTPS, but requested an insecure resource 'http://my-alb-XXXXXXX.us-xxxx-X.elb.amazonaws.com/api/goals'. This request has been blocked; the content must be served over HTTPS.
My Assumption of What Went Wrong
- Since AWS ALB has its own DNS Name, which is "Not Secure"
- Connecting my new secured domain name TO an unsecured AWS ALB DNS name would be the problem.
Appreciate Your Response
Thank you,
ARUN