As you may now Rails asset pipeline (a.k.a. Sprockets) compress your assets (JS, CSS, …) and inserts hash into file name so that CDN can pick up the change: So if you had app.js you will have app-908e25f4bf641868d8683022a5b62f54.js this way your app will interpret: <html> <head> <%= javascript_include_tag 'app' %> <head> To <html> <head> <script src="https://dxxxxxxxxx6lt.cloudfront.net/assets/app