Excluding URLs from Cache in Super Page Cache
Super Page Cache caches all public pages by default. When you need to prevent specific URLs or content types from being cached, the plugin gives you two ways to do that:
- Prevent the Following URIs to Be Cached — Exclude specific URL paths using text patterns.
- Don't Cache the Following Dynamic Contents — Exclude entire WordPress content types using checkboxes.
This article explains when to use each option and provides common examples.
Using the URI Exclusion Field
The Prevent the Following URIs to Be Cached field is on the General tab. Enter one URL path pattern per line. You can use a wildcard (*) to match multiple pages.
To add a URI exclusion:
- Go to Settings > Super Page Cache in your WordPress admin.
- On the General tab, find Prevent the Following URIs to Be Cached.
- Enter one path pattern per line.
- Click Save Settings.
- Purge the cache so that any already-cached versions of the excluded pages are cleared.
Common URI exclusion patterns
| Pattern | What it excludes |
|---|---|
/my-account* | WooCommerce account page and all its sub-pages (e.g., /my-account/orders/) |
/page/ | All paginated archive URLs such as /blog/page/2/, /category/news/page/3/ |
/checkout/ | The WooCommerce checkout page |
/cart/ | The WooCommerce cart page |
📝 Note: URI patterns match against the URL path only. They do not match query strings. For example, entering *?ref=* will not work because the plugin evaluates the path segment of the URL, which does not include query strings. To handle query parameters, use the Ignore Marketing Parameters feature (Pro) instead — see Bypass Cache for Specific Query Parameters.
Excluding paginated archive pages
WordPress paginated archive URLs follow the pattern /page/N/. For example:
/blog/page/2//category/news/page/3//tag/tutorials/page/2/
These pages are cacheable by default. This is expected plugin behavior, not a bug. The main archive page (e.g., /blog/ or /category/news/) stays cached even if you exclude the paginated versions.
To exclude only paginated archive pages while keeping the main archive cached, add /page/ to the URI exclusion field. This will match all WordPress pagination paths across all archive types.
📝 Note: Only add /page/ to this field if you specifically want paginated archive pages to be generated fresh on every request — for example, if they display frequently changing or user-specific content. On most sites, caching paginated archives is desirable because the content changes infrequently and the caching reduces server load.
Using the Dynamic Content Exclusion Checkboxes
The Don't Cache the Following Dynamic Contents checkboxes are under Advanced → Cache. Each checkbox excludes an entire WordPress content type from caching — not just a specific URL pattern.
Common checkboxes and what they exclude:
- Archives — All date-based and other archive pages (including paginated versions).
- Categories — All category archive pages.
- Tags — All tag archive pages.
- Search Pages — All search result pages.
- WP JSON Endpoints — All WordPress REST API requests. Use this instead of writing a custom
/wp-json/URI rule.
Choosing the Right Exclusion Method
Use URI patterns when you want to exclude a specific URL path. Examples:
- Only paginated archive pages (
/page/) - A specific account or member area (
/my-account*) - A single page or sub-section of your site
Use Dynamic content checkboxes when you want to stop caching an entire WordPress content type. Examples:
- All archive pages (not just paginated ones)
- All search result pages
- All WordPress REST API endpoints
💡 Tip: For REST API cache bypassing, use the WP JSON Endpoints checkbox rather than a custom /wp-json/ URI rule. For admin-area bypassing, use the Force Cache Bypassing for Backend option under Advanced → Cloudflare Cache Behavior. These built-in settings are more reliable and easier to maintain than custom URI rules.
