So i've been trying out cloudfront from AWS.
Why is the URL 'example.com' resolving to 'example.com.s3.eu-west-1.amazonaws.com' in the Address Bar? I've tried googling loads of questions with this problem but the fact that i'm not seeing any relevant answers is telling me i've configured it wrong.
If AWS are advertising whole-site delivery, surely the idea is that you always see www.example.com/[PATH] in the address bar!?
I now navigate to example.com/index.html, and it redirects to example.com.s3.eu-west-1.amazonaws.com/index.html. What I want to see is still "example.com/index.html" and all the CDN magic should happen behind the scenes to the end-user.
- I've got an S3 bucket as my origin serving static content. I've set up 2 buckets in total, example.com containing all my content, and www.example.com with a redirect to example.com
- I've setup my DNS in Route 53 with an A-record ALIAS on the root domain name (example.com) pointing to my Cloudfront domain name. I've also got a CNAME record for www.example.com pointing to example.com
- I've added "example.com" and "www.example.com" as alternate CNAME's in my cloudfront distribution.
What am I missing here?
Edit: Thanks Halfgar - I'm new to this community.
$ curl --head www.example.com
...
Location: example.com.s3-eu-west-1.amazonaws.com
...
$ curl --head example.com
...
Location: example.com.s3-eu-west-1.amazonaws.com
...