I have an application which serves assets under the following URL:
https://example.com/assets/...
Now I want to use Amazon CloudFront to serve these assets with the URL
https://cdn.example.com/assets/...
The things I have done:
cdn.example.com
CNAME
DNS record pointing cdn.example.com
to example.com
Now I feel like that configuration does not serve the assets via CloudFront. Instead if I request my CloudFront Domain Name, lets say dpw02sdffky7p.cloudfront.net
, I get redirected to example.com
. So it feels like my assets are still being served from my server, just with some redirects in between.
Am I right? What would be the correct configuration to achieve my goal?
while creating cname record in route53, Alias should be given as yes for endpoints like cloudfront, it will resolve the redirection in server side itself.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.