# Stop WP Rocket Preloading Certain URLs

> Keeps WP Rocket's cache preload from crawling URLs you list, such as filtered archive pages, calendars or tag pages, saving server resources on large sites.

- Type: PHP
- Runs: Run everywhere
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: wp-rocket, preload, performance
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/rocket-preload-exclusions/

## Code

```php
$wpide_skip = array( '/tag/(.*)', '/events/list/page/(.*)', '(.*)filter_(.*)' ); // URL patterns not to preload.

add_filter( 'rocket_preload_exclude_urls', function ( $regexes ) use ( $wpide_skip ) {
    return array_values( array_unique( array_merge( (array) $regexes, $wpide_skip ) ) );
} );
```

## Notes

Patterns are regular expressions matched against the URL, e.g. /tag/(.*) or (.*)?filter_(.*).

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Stop WP Rocket Preloading Certain URLs" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
