Title: Serving css/js files from Cloudfront CDN
Last modified: April 21, 2017

---

# Serving css/js files from Cloudfront CDN

 *  [RobiW](https://wordpress.org/support/users/robiw/)
 * (@robiw)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/serving-cssjs-files-from-cloudfront-cdn/)
 * Have setup CDN on S3/Cloudfront platform. Also, using Super Cache.
 * Can upload media and with CDN on in SuperCache images served from CDN so connection
   with cdn appears ok.
 * But with or without cloudfront url activated in Autoptimize no css or js served.
   Source shows cloudfront url for Autoptimize assets.
 * Is there any other settings need entered or else done to have Autoptimize files
   uploaded and served from cdn? Should it happen automatically, or do they have
   to be uploaded manually in first instance?
 * Thanks for any insights.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/serving-cssjs-files-from-cloudfront-cdn/#post-9053219)
 * AO does not push files to a CDN [@robiw](https://wordpress.org/support/users/robiw/),
   it assumes the files are on the CDN (using “pull cdn”, typically), so you’d have
   to ensure the autoptimized files are mirrored on S3/ Cloudfront somehow.
 * hope this clarifies,
    frank
 *  Thread Starter [RobiW](https://wordpress.org/support/users/robiw/)
 * (@robiw)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/serving-cssjs-files-from-cloudfront-cdn/#post-9053260)
 * Thanks for answering the question so quickly. Now just have to figure out how
   to mirror them when any changes made.
 * regards
    Rob
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/serving-cssjs-files-from-cloudfront-cdn/#post-9053269)
 * well, you can tell AO to store the cache elsewhere (see [FAQ](https://wordpress.org/plugins/autoptimize/faq/)),
   so assuming you have something which monitors/ mirrors `wp-content/uploads` (
   but not based on an upload action per se), then changing AO’s cache-path to e.
   g. `wp-content/uploads/aocache/` could work?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Serving css/js files from Cloudfront CDN’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/serving-cssjs-files-from-cloudfront-cdn/#post-9053269)
 * Status: not resolved