I'm setting up CloudFront (CF) using third party hosting as the origin.

What I want is to have the CF servers act as my own hosting, meaning I don't want to fetch files from the likes of cdn.domain.com, but from my main domain at domain.com.

How do I set this up?

Do I need upload my files on origin.domain.com, for instance, and then put the main domain as the "alternate domain" (CNAME) in CF?


All right, so unless I'm missing something, I think I've found the answer to this.

For any future reference, here it is:

I do need to upload files to a subdomain (which is to be the "origin) and then enter the main domain in "Alternate domain" (CNAME).

For subdomains:

This was an issue too. I bascially need different content for different langauges (go figure), which are located on this basis: es.example.com

Since you need to serve content that is different from other places, you need a dedicated distribution for this. In CF you can choose to pull from folders, so just enter your main domain and specify the folder.

Now put the asterisk (*) in CNAME in CF, and point es.example.com to the CF URL given, in the DNS at your hosting.

That should be it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.