---
title: How do I set custom cache expiration rules?
description: "Meta description: Set domain-level and pattern-based cache expiration rules in Prerender.io to control how often specific pages are recached."
---

[Skip to content](https://docs.prerender.io/docs/custom-cache-expiration#main-content)

![prerender-logo](https://docs.prerender.io/hs-fs/hubfs/logo.png?width=100&height=75&name=logo.png)

Open main navigation

Close main navigation

- [Contact us](mailto:support@prerender.io)

[Contact us](mailto:support@prerender.io)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base - Prerender.io](https://docs.prerender.io/docs?hsLang=en)
2. [Get Found on AI & Search](https://docs.prerender.io/docs/get-found-on-ai-search?hsLang=en)

November 2, 2026

# How do I set custom cache expiration rules?

## Control how often Prerender.io recaches specific pages by setting domain-level and pattern-based expiration rules.

 

 Custom cache expiration is only available on Pro and Enterprise Plus (custom) plans. 

### TL;DR

Custom cache expiration lets you define how often Prerender.io recaches your pages at two levels: a domain-wide default and pattern-based rules for specific URL paths. Set a broad expiration for your entire domain, then create rules for sections that need shorter or longer intervals. This feature is available on Pro and Enterprise plans.

### How cache expiration rules are evaluated

When Prerender.io evaluates a URL, it checks expiration settings in this order:

1. **Pattern-based rule.** If the URL matches a pattern rule, that rule's expiration applies.
2. **Domain-level expiration.** If no pattern rule matches, the domain's default expiration applies.
3. **Account-level expiration.** If no domain-level setting exists, the account-wide default applies.

The most specific setting always wins.

### Domain-level cache expiration

Domain-level expiration sets a default recache interval for all pages under a domain. It applies to any URL that does not match a pattern-based rule.

Use this when:

- You are onboarding a new site and want a default cache policy before creating pattern rules.
- Your domain has mostly stable content where a single interval works.

### .

#### Step 1: Open Domain Manager and select your domain.

1. Log into your dashboard and open **Domain Manager**.
   
   ![Domain Manager section in the Prerender.io dashboard sidebar](https://docs.prerender.io/hs-fs/hubfs/image-png-Oct-13-2025-07-27-19-2407-AM.png?width=275&height=269&name=image-png-Oct-13-2025-07-27-19-2407-AM.png)
2. Click the view icon (👁️) next to your target domain  ![Domain list with view icon to open domain settings](https://docs.prerender.io/hs-fs/hubfs/image-png-Oct-13-2025-07-27-42-0677-AM.png?width=518&height=155&name=image-png-Oct-13-2025-07-27-42-0677-AM.png)
3. Scroll to **Scheduler Settings**.![Scheduler Settings section within Domain Manage](https://docs.prerender.io/hs-fs/hubfs/image-png-Oct-13-2025-07-28-21-4890-AM.png?width=670&height=450&name=image-png-Oct-13-2025-07-28-21-4890-AM.png)

#### **Step 2:  Set your domain-level cache expiration.**

1. Move the slider to your preferred value (typically 6 hours to 30 days).  
    ![Cache expiration slider for setting domain-level recache interval](https://docs.prerender.io/hs-fs/hubfs/image-png-Oct-14-2025-02-59-51-9156-PM.png?width=670&height=459&name=image-png-Oct-14-2025-02-59-51-9156-PM.png)
2. Click on Update  
   ![Update button confirming domain-level cache expiration change](https://docs.prerender.io/hs-fs/hubfs/image-png-Oct-14-2025-03-00-15-9650-PM.png?width=483&height=415&name=image-png-Oct-14-2025-03-00-15-9650-PM.png)

 All pages under this domain that do not match a pattern rule will now recache at this interval. 

#### Pattern-based cache expiration

Pattern-based rules let you set different cache expiration intervals for specific URL paths. This is useful when different sections of your site change at different rates.

**Examples:**

- `/blog/*` with a 12-hour expiration keeps news content fresh.
- `/products/` with a 6-hour expiration keeps pricing accurate.
- A static `/about/` section can use the longer domain-level default.

#### Step 3: create a pattern-based rule.

1. In **Scheduler Settings**, click **Add Rule**. A modal appears.  
   ![Add Rule button in Scheduler Settings for creating pattern-based rules](https://docs.prerender.io/hs-fs/hubfs/image-png-Oct-13-2025-07-28-43-1063-AM.png?width=670&height=231&name=image-png-Oct-13-2025-07-28-43-1063-AM.png)
2. In the **Rule** field, enter the URL pattern you want to match.
3. Use the slider to set cache expiration for matched URLs
4. Click Save
5. Click **Add Rule**. A modal appears, add your pattern.

#### Pattern matching options

**Substring match.** Enter a string that appears in your target URLs. Prerender.io uses a "contains" match.

- `/products/` matches any URL containing `/products/`.
- `/blog/2024/` matches all posts from 2024.
- `?category=electronics` matches URLs with that query parameter.

``

**Wildcard match.** Use `*` to match any sequence of characters.

- `/blog/*/comments` matches all comment pages under blog posts.
- `/products/*/reviews` matches all product review pages.
- ![](https://docs.prerender.io/hs-fs/hubfs/undefined-Oct-13-2025-07-32-30-7021-AM.png?width=525&height=360&name=undefined-Oct-13-2025-07-32-30-7021-AM.png)

ℹ️ Wildcard patterns are converted to regular expressions internally (\* becomes .\*). Non-wildcard patterns use a SQL `LIKE`match with % on both sides (e.g.,`/products/` matches any URL containing `/products/`). Pattern matching may be case-sensitive depending on your configuration.

### Validation rules

When you save a rule, Prerender.io validates it:

- **50% cap.** A rule cannot affect more than 50% of your domain's cached URLs.
- **Plan limits.** Pro plans allow 5 rules per domain. Enterprise plans allow 10.
- **No duplicates.** Each pattern must be unique per domain.

If validation fails, you may see messages like:

- "Setting affects more than 50% of urls"

  ![Validation error: rule affects more than 50% of domain URLs](https://docs.prerender.io/hs-fs/hubfs/image-png-Oct-13-2025-07-32-34-8303-AM.png?width=302&height=55&name=image-png-Oct-13-2025-07-32-34-8303-AM.png)

- "Max rules per domain is already reached"![Validation error: maximum rules per domain already reached](https://docs.prerender.io/hs-fs/hubfs/image-png-Oct-13-2025-07-33-17-8434-AM.png?width=389&height=77&name=image-png-Oct-13-2025-07-33-17-8434-AM.png)
- "Setting with the same rule already exists"![Validation error: a rule with the same pattern already exists](https://docs.prerender.io/hs-fs/hubfs/image-png-Oct-13-2025-07-33-30-1248-AM.png?width=356&height=66&name=image-png-Oct-13-2025-07-33-30-1248-AM.png)

 

#### Step 4: review your rules in the Scheduler Settings table.

After adding rules, they appear in a table:

 

| Column | Description |
| --- | --- |
| **Rule** | The URL pattern you defined |
| **Cache Expiration** | The recache interval selected |
| **Number of Pages** | How many cached URLs currently match this pattern |
| **Actions** | Delete the rule when it’s no longer needed |

#### How new rules interact with your existing cache schedule

When you create or update a cache expiration rule, the new setting **does not immediately trigger a recache**. Each cached page is already following the schedule established by its previous expiration setting.

![Cache schedule showing the next recache time for a cached page](https://docs.prerender.io/hs-fs/hubfs/image-png-Dec-03-2025-04-35-44-6292-AM.png?width=327&height=226&name=image-png-Dec-03-2025-04-35-44-6292-AM.png) 

Each page has a next scheduled recache based on the interval that applied when it was last rendered. You can see this schedule in **Caching Queue → Automated Queue**, where cached pages are listed with their next recache time.

After a page completes its current recache cycle, it begins following the new expiration rule. From that point onward, Prerender.io recalculates future recache timings based on your updated settings.

![](https://docs.prerender.io/hs-fs/hubfs/image-png-Dec-03-2025-04-41-25-7101-AM.png?width=464&height=379&name=image-png-Dec-03-2025-04-41-25-7101-AM.png)

This means:

- You may still see URLs recaching according to their original interval until their current cycle completes.
- The transition happens gradually, not instantly.

### Render count impact

Shorter cache expiration intervals increase your render count. For example, 100 URLs with a 1-day expiration recache twice daily (desktop and mobile), resulting in approximately 6,000 renders per month with mobile rendering enabled. 

ℹ️ Prerender.io renders both a desktop and a mobile version of each page by default. Each version counts as a separate render. If mobile rendering is disabled, the count in the example above drops to approximately 3,000 renders per month.

### Role Permissions

| Role | View Rules | Create Rules | Delete Rules |
| --- | --- | --- | --- |
| **Owner/Admin** | ✓ | ✓ | ✓ |
| **Member** | ✓ | ✓ | ✓ |
| **Billing Manager** | ✓ | ✗ | ✗ |
| **Guest** | ✓ | ✗ | ✗ |

### Troubleshooting

| Issue | Cause | Solution |
| --- | --- | --- |
| “Setting affects more than 50% of URLs” | Rule too broad | Make it more specific or split it into smaller rules |
| Pattern not matching expected URLs | Case sensitivity or incorrect pattern | Verify capitalization and wildcard placement |
| “Add Rule” button disabled | Reached plan limit or missing permissions | Upgrade your plan or contact support |

 

#### What happens to your rules when you change plan

Custom cache expiration, both domain-level and pattern-based rules, is available only on Pro and Enterprise Plus plans. If you move to a plan that does not include it, your custom rules are removed, so it is worth knowing what changes before you downgrade.

When you downgrade to a plan without custom cache expiration:

- Your pattern-based rules and your domain-level expiration are removed from each affected domain.
- Those domains fall back to your account-wide cache expiration, the single default that applies to every domain on your account.
- If you had turned automatic recache off for a domain, that setting does not carry over. The domain returns to scheduled recaching at your account-wide interval.

Plan changes take effect at the start of your next billing cycle, so your rules stay in place until then.

> ⚠️ Because affected domains go back to scheduled recaching at your account-wide interval, this can use more renders after a downgrade. After a plan change, review your account-wide cache expiration setting so it matches how often your content actually changes.

> ℹ️ Downgrading removes your custom rules rather than pausing them. If you later upgrade back to Pro or Enterprise Plus, your previous rules are not restored automatically, so you will need to create them again. Note down your current rules before downgrading if you want a record of them, for example by taking a screenshot of the rules table in Scheduler Settings. Per-domain changes are not logged, so Prerender.io cannot restore them for you.

To learn how plan changes are applied and when they take effect, see [Changing your Prerender.io plan](https://docs.prerender.io/docs/changing-your-plan?hsLang=en).

#### Related articles

- [How does cache expiration work in Prerender.io?](https://docs.prerender.io/docs/modify-the-cache-expiration?hsLang=en)
- [How do I stop Prerender.io from caching certain URLs?](https://docs.prerender.io/docs/ignore-config?hsLang=en)
- [How Prerender.io works](https://docs.prerender.io/docs/how-prerender-io-works?hsLang=en)

 

💬 Still need help? If your cache expiration rules are not behaving as expected, our support team can help you diagnose the issue. Contact us at [support@prerender.io](mailto:support@prerender.io)

 

- [How Prerender.io works](https://docs.prerender.io/docs/how-prerender-io-works?hsLang=en)
- [Getting started](https://docs.prerender.io/docs/getting-started?hsLang=en)
- [Integrations](https://docs.prerender.io/docs/integrations?hsLang=en#main-content)

    - [Prerender.io officially maintained integration](https://docs.prerender.io/docs/integrations?hsLang=en#prerender-io-officially-maintained-integration)
    - [Available integrations](https://docs.prerender.io/docs/integrations?hsLang=en#available-integrations)
    - [FAQ](https://docs.prerender.io/docs/integrations?hsLang=en#faq)
- [Get Found on AI & Search](https://docs.prerender.io/docs/get-found-on-ai-search?hsLang=en#main-content)

    - [Google Search Performance](https://docs.prerender.io/docs/get-found-on-ai-search?hsLang=en#google-search-performance)
- [Troubleshooting](https://docs.prerender.io/docs/troubleshooting?hsLang=en)
- [Billing & Account](https://docs.prerender.io/docs/billing-account?hsLang=en#main-content)

    - [Plans & Subscriptions](https://docs.prerender.io/docs/billing-account?hsLang=en#plans-subscriptions)
    - [Renders, Usage & Limits](https://docs.prerender.io/docs/billing-account?hsLang=en#renders-usage-limits)
    - [Payments & Invoices](https://docs.prerender.io/docs/billing-account?hsLang=en#payments-invoices)
    - [Account Access & Security](https://docs.prerender.io/docs/billing-account?hsLang=en#account-access-security)
- [Features](https://docs.prerender.io/docs/features?hsLang=en)
- [Security](https://docs.prerender.io/docs/security?hsLang=en)

[![Chill listening crop-3](https://docs.prerender.io/hs-fs/hubfs/logo-1.png?width=24&height=24&name=logo-1.png "Chill listening crop-3")](http://prerender.io)

304 S. Jones Blvd #1205, Las Vegas, NV 89107

<https://www.twitter.com/> [mailto:support@prerender.io](mailto:support@prerender.io) <https://www.linkedin.com/company/prerender/> <https://github.com/prerender>

Copyright © 2025, Prerender.io