Title: CDN for Autoptimized files: autoptimize_404_handler.php
Last modified: September 4, 2024

---

# CDN for Autoptimized files: autoptimize_404_handler.php

 *  Resolved [yabdali](https://wordpress.org/support/users/yabdali/)
 * (@yabdali)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/cdn-for-autoptimized-files-autoptimize_404_handler-php/)
 * Hi,
 * I just need a clarification, when adding a CDN configuration in the CDN for Autoptimized
   files, I noticed in the past that whenever there is expired cache inconsistencies
   between page caching plugins (WP Super Cache), Cloudflare and Autoptimize I would
   get 404 errors. I currently have this disabled, using WP Super Cache to handle
   CDN related configs. However, I want to use the CDN as well for Autoptimize files
   but need to find a way to resolve the issue mentioned above. When using the CDN,
   which is also on the same server as the main website, the 404 is handled by Nginx
   CDN configs and not processed by the PHP location block for the main server. 
   I presume that due to this, the hook for plugin isn’t detecting the issue.
   Can
   you please advise on the best options? Thanks in advance…

Viewing 1 replies (of 1 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/cdn-for-autoptimized-files-autoptimize_404_handler-php/#post-17994102)
 * Maybe try to configure Nginx to redirect to `wp-content/cache/autoptimize/autoptimize_fallback.
   js` for non-existent aggregated JS or `wp-content/cache/autoptimize/autoptimize_fallback.
   css` for missing aggregated CSS?
 * hope this helps,
    frank

Viewing 1 replies (of 1 total)

The topic ‘CDN for Autoptimized files: autoptimize_404_handler.php’ 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/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [cdn](https://wordpress.org/support/topic-tag/cdn/)

 * 1 reply
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/cdn-for-autoptimized-files-autoptimize_404_handler-php/#post-17994102)
 * Status: resolved