How to hide (or delay) Cloudflare Apps on a forwarding subdomain?

using_apps

#1

Hi,

My site is created by Wordpress.
I have a subdomain that does a 0 sec redirect to a page inside the site. (A category)
I have changed the style (fonts and colors) and position of the Cloudflare Apps in the Custom CSS of the Wordpress theme to create a better visual for my RTL site.

Now my problem is when I open the subdomain, all apps are loading before the redirect takes place with the default styles and positions. Because of the fact that the forwarding subdomain obviously doesn’t have a Wordpress theme installed on it and doesn’t have an CSS file. And then when the page is redirected they all load again with the custom styles.

So what can I do to either hide or delay the apps in this forwarding subdomain util they can be correctly loaded in the redirected page?

P.S: Also all apps are loading in the back-end (admin area).

Thanks,


#2

Hi @shahab.siavash,

You can disable apps on particular paths using page rules. Select the path you want to apply it to and then choose disable apps from the dropdown list. You can also have Cloudflare do the redirection for you (with a 301 or 302 redirect) if you don’t wish to rely on your server to perform the task:

https://support.cloudflare.com/hc/en-us/articles/200172286-How-do-I-perform-URL-forwarding-or-redirects-with-Cloudflare-


#3

Thanks a lot. I had totally forgotten about the fact that “Disable Apps” is for new Cloudflare Apps too. :slight_smile: I thought it was for the old apps. I did disabled the apps on the admin area and the forwarding subdomain in 2 page rules.
Thanks again.


#4

@cscharff:

We have created a page rule for the following subdirectory: *mysite.com/blog/ and activated “Disable Apps.” Following activation, we also purged all cache.

Unfortunately, we still see the app applied to the subdirectory. Specifically: https://mysite.com/blog/

Any thoughts or suggestions on how to fix this?


#5

You have a rule priority issue. Only one page rule will fire for a page and it will be the first in the priority list which matches. You have at least 1 rule (rule 4) mysite.com/ which is being invoked before the other rule has a chance to fire. Moving the rule you created above that should (at a quick glance) result in the rule firing as expected.


#6

Worked like a charm! Thanks, @cscharff!