Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Currently have a Cloudfront CDN with an Origin pointed to http://mysite.com. The CDN URL is something like jr27a8vopf32a.cloudfront.net. Currently there are a lot of external consumers of a file hosted on my site and access it via Cloudfront ( e.g. http://jr27a8vopf32a.cloudfront.net/files/library.js) so it's important that CDN URL remains the same.

I would like to change the origin (external.mysite.com - which will include the same files and file structure) and I was wondering if this type of change would effect the Domain Name used by amazon (jr27a8vopf32a.cloudfront.net)?

I am assuming this will work, but given the number of people relying on the file I thought it would be a good idea to check before proceeding.

Thanks in advance,

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Are you having the content on the CDN accessed by using the jr27a8vopf32a.cloudfront.net host name?

The usual way is to not expose the cloudfront server name, but add a CNAME entry to your DNS to point requests for CDN content to something like media.mysite.com

media.mysite.com   CNAME   jr27a8vopf32a.cloudfront.net

Cloudfront is notified of this CNAME and then this allows all the content linking to be served as something out of your own domain.

Back to the original question about changing the ORIGIN from mysite.com to www.mysite.com or example.com. As long as you aren't setting up a new Distribution, but only changing the ORIGIN for the existing distribution, you will be keeping the same Amazon assigned domain name, so jr27a8vopf32a.cloudfront.net will remain the same and be available, but will pull the content from the new ORIGIN.

share|improve this answer
    
Thanks! I really appreciate it. –  user1056677 Aug 25 '13 at 5:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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