Cloudfront - Failed to contact the origin

17,893

Solution 1

There are two issues:

1) You need a valid certificate for your subdomain m.giftsdirect.com in order to setup HTTPS. Currently, a wildcard cert for *.cloudfront.net is returned and that won't work for your subdomain.

2) A HTTP 503 error is referring to an issue between the CDN and your origin server. If your origin server does not support HTTPS, you need to ensure that Cloudfront fetches the content via HTTP (not HTTPS). Do the following:

  1. Open the CloudFront Management Console and go to your distribution.
  2. Navigate to the Origins tab, pick your origin and click "Edit"
  3. Edit the "Origin Protocol Policy" to "HTTP Only".
  4. Save the changes and wait at least 15 minutes for the change to be active.

Solution 2

your ssl certificate is not valid, above wont work with https as origin server cannot get through without not accepting certificate.

cloudfront doesnot do --insecure attempt.

And below url works as you have http connection.

you can see issue here.

Share:
17,893
Author by

pokero

Updated on September 18, 2022

Comments