Title: StackPath CDN
Last modified: May 13, 2020

---

# StackPath CDN

 *  Resolved [adistirom](https://wordpress.org/support/users/adistirom/)
 * (@adistirom)
 * [6 years ago](https://wordpress.org/support/topic/stackpath-cdn-2/)
 * When I try to activate the CDN URL rewrite everything breaks. The site is not
   rendered correctly. Any ideas?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fstackpath-cdn-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [6 years ago](https://wordpress.org/support/topic/stackpath-cdn-2/#post-12830581)
 * [@adistirom](https://wordpress.org/support/users/adistirom/) are you saying that
   you used “//q8g8r6v2.stackpathcdn.com” as a CNAME in both input fields and none
   of the Asset CleanUp’s optimized files were loading? If that’s the case, there
   could be a bug somewhere or a plugin incompatibility. Please check the image 
   I’ve added here: [https://ibb.co/GP8JYZT](https://ibb.co/GP8JYZT) – is that the
   change you made?
 * Also, I’ve checked the source code of your website and I have a suspicion that
   the problem could be from the **/mainsite/** that you have in the URL (it might
   be skipped).
 * I made a few tests and I noticed that [https://q8g8r6v2.stackpathcdn.com/wp-content/cache/asset-cleanup/js/item/b1dc3fb47cf00c4c5c86346487ce5df1-vb882e63a139948e21a3a1bae6747225333276421.js](https://q8g8r6v2.stackpathcdn.com/wp-content/cache/asset-cleanup/js/item/b1dc3fb47cf00c4c5c86346487ce5df1-vb882e63a139948e21a3a1bae6747225333276421.js)
   which is the replacement result is not working. It returns a 404 page. However,
   when **[https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/cache/asset-cleanup/js/item/b1dc3fb47cf00c4c5c86346487ce5df1-vb882e63a139948e21a3a1bae6747225333276421.js](https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/cache/asset-cleanup/js/item/b1dc3fb47cf00c4c5c86346487ce5df1-vb882e63a139948e21a3a1bae6747225333276421.js)**
   is used, it does work fine.
 * I’ll do further tests and have this fixed so the right URL (WordPress one) and
   not the site URL (root one) is used.
 * My apologies for this inconvenience & this will be fixed as soon as possible!
 * PS: If you will ever be interested in the Pro version, I can give you a hefty
   discount as a thank you for reporting this bug that could affect others.
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [6 years ago](https://wordpress.org/support/topic/stackpath-cdn-2/#post-12835574)
 * [@adistirom](https://wordpress.org/support/users/adistirom/) I found the solution
   for this situation. I’m not sure of your WordPress/CDN configuration unless I
   will get more information about it, but from what I checked, your issue can be
   fixed 100% by using a different CNAME. Here’s what you need to do:
 * 1) Go to “CDN: Rewrite assets URLs” from plugin’s “Settings”.
    2) Re-enable “
   Enable CDN URL rewrite?” and in both fields (“For Stylesheet (.css) Files:” &“
   For JavaScript (.js) Files:”) use the following CNAME: **//q8g8r6v2.stackpathcdn.
   com/mainsite** (currently you have it without _/mainsite_)
 * This is because your website’s URL is different than the URL to the WordPress
   installation and where the files are located (e.g. /mainsite/wp-content/themes/
   storefront/style.css?ver=2.5.5). If you will ever stop using “mainsite” or rename
   it to something else, then you need to update the CNAME accordingly.
 * In my debugging tests, this has been working fine on your end.
 * By the way, after I checked your website’s homepage, it looks like you have plenty
   of CSS files that aren’t needed there and if you unloaded them, you can decrease
   the total page size and increase your page speed score. Here are the ones that
   seem to be completely unused:
    - [https://c0.wp.com/p/woocommerce/3.9.3/packages/woocommerce-blocks/build/style.css](https://c0.wp.com/p/woocommerce/3.9.3/packages/woocommerce-blocks/build/style.css)
    - [https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/themes/storefront/assets/css/base/gutenberg-blocks.css?ver=2.5.5](https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/themes/storefront/assets/css/base/gutenberg-blocks.css?ver=2.5.5)
    - [https://c0.wp.com/c/5.4.1/wp-includes/css/dist/block-library/theme.min.css](https://c0.wp.com/c/5.4.1/wp-includes/css/dist/block-library/theme.min.css)
    - [https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/themes/storefront/assets/css/jetpack/widgets.css?ver=2.5.5](https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/themes/storefront/assets/css/jetpack/widgets.css?ver=2.5.5)
    - [https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/plugins/storefront-footer-bar/assets/css/style.css?ver=5.4.1](https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/plugins/storefront-footer-bar/assets/css/style.css?ver=5.4.1)
    - [https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/plugins/controlled-admin-access/public/css/controlled-admin-access-public.css?ver=1.0.0](https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/plugins/controlled-admin-access/public/css/controlled-admin-access-public.css?ver=1.0.0)
 * Consider enabling “Test Mode” if you worry you might break something during the
   unloading process and check how your page looks after each of the unloadings 
   on both desktop and mobile view. Once all is good, you would have saved a few
   hundred KB of extra unused CSS which I believe it’s worth the time 😉
 *  Thread Starter [adistirom](https://wordpress.org/support/users/adistirom/)
 * (@adistirom)
 * [6 years ago](https://wordpress.org/support/topic/stackpath-cdn-2/#post-12836115)
 * Thanks! It works.
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [6 years ago](https://wordpress.org/support/topic/stackpath-cdn-2/#post-12836122)
 * [@adistirom](https://wordpress.org/support/users/adistirom/) Awesome! I hope 
   you’ll find the plugin useful in the long term! If you’re happy with it overall
   it would be great if you can spare a minute and leave a quick review about it
   here: [https://wordpress.org/support/plugin/wp-asset-clean-up/reviews/#new-post](https://wordpress.org/support/plugin/wp-asset-clean-up/reviews/#new-post)

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

The topic ‘StackPath CDN’ is closed to new replies.

 * ![](https://ps.w.org/wp-asset-clean-up/assets/icon-256x256.png?rev=1981952)
 * [Asset CleanUp: Page Speed Booster](https://wordpress.org/plugins/wp-asset-clean-up/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-asset-clean-up/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-asset-clean-up/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-asset-clean-up/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-asset-clean-up/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-asset-clean-up/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/stackpath-cdn-2/#post-12836122)
 * Status: resolved