{"id":17712002,"date":"2024-04-25T03:56:34","date_gmt":"2024-04-25T03:56:34","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/error-adding-existing-cloudfront\/"},"modified":"2024-04-25T03:56:34","modified_gmt":"2024-04-25T03:56:34","slug":"error-adding-existing-cloudfront","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/error-adding-existing-cloudfront\/","title":{"rendered":"Error adding existing CloudFront"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hello,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I have an existing CloudFront distribution serving my WP, and I want to add it to W3TC so I can use auto-invalidation. I added the CloudFront domain and CNAME in the &#8220;Replace site&#8217;s hostname with&#8221; field, but then I click to test I get the error &#8220;Error: Distribution for origin &#8220;www.my-website.com&#8221; not found. The user permissions are correct (I&#8217;ve even tried attaching admin permissions and got the same error).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The DNS www.my-website.com is pointing to the CloudFront distribution, so the origin domain is different (origin-www.my-website.com) since it points to an ALB, however I can&#8217;t edit or rename the field &#8220;Origin&#8221; on the W3TC configuration page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As part of the troubleshooting, I&#8217;ve tested adding a dummy origin with origin domain &#8220;origin-www.my-website.com&#8221; and the test passed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Is there a way to rename the &#8220;Origin&#8221; on the W3TC CDN Configuration? If not, what is the correct way to import an existing CloudFront distribution?<\/p>\n","protected":false},"template":"","class_list":["post-17712002","topic","type-topic","status-publish","hentry","topic-tag-cdn","topic-tag-cloudfront","topic-tag-w3tc"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17712002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17712002\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=17712002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}