0

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?

Trace DeCoy
  • 153
  • 2
  • 6
  • Please choose one Stack Exchange site that is the best fit for for your question, instead of cross-posting. http://stackoverflow.com/questions/31379366/pulling-content-from-subdomain-serving-it-on-main-domain-aws-cloudfront – Michael - sqlbot Jul 13 '15 at 11:32
  • Was unsure where to post. I've removed the other one. Thanks for letting me know. – Trace DeCoy Jul 13 '15 at 12:13

1 Answers1

0

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.

Trace DeCoy
  • 153
  • 2
  • 6