Overview
VergeCloud Page Rules allow you to customize and fine-tune how your domain behaves within the VergeCloud CDN ecosystem. They give you granular control over performance, security, caching, redirects, and request handling at the edge. Instead of applying broad, domain-wide settings, Page Rules let you define specific behavior for individual URLs, directories, patterns, or parameters.
With Page Rules, you can improve load times by controlling how content is cached, enforce secure redirects without touching your origin, optimize media files automatically, manage device-specific experiences, and override origin headers when needed. They are especially useful for delivering dynamic websites, e-commerce storefronts, API endpoints, and high-traffic applications where precision and performance matter.
Because Page Rules execute at VergeCloud’s global edge network, changes take effect instantly and do not require modifications to your backend or codebase. This ensures faster deployments, reduced origin load, and consistent behavior across all regions
How Page Rule Priorities Work
Page Rules run in order from top to bottom. Only the first matching rule is applied to any request.
To avoid misconfigurations:
- Place high priority rules at the top.
- Combine related actions into a single rule where possible.
- Use accurate and specific URL patterns for precision.
Redirect
Forward users from one page to another using 301 or 302 redirects.
Key Options
- URL Pattern
- Redirect Target
- Redirect Type
Steps
- Open Page Rules.
- Select Redirect.
- Enter the pattern, target URL, and type.
- Save.
Cache Settings
Control how VergeCloud
caches your domain’s content. Configure cache levels, expiration times, device-based caching, and more.
Key Options
- URL Pattern
- Cache Level
- Cache Max Age
- Cookie-Based Caching
- Special Querystrings
- Cache Error Pages
- Ignore Vary Header
- Cache Page with Set-Cookie
Steps
- Open Page Rules in the VergeCloud panel.
- Create a new rule and enter the URL pattern.
- Configure cache settings.
- Save the rule.
Browser Cache
Defines how long browsers should keep static files to improve loading speed.
Key Options
- URL Pattern
- Browser Cache TTL
Steps
- Create a new rule.
- Select Browser Cache.
- Set the TTL value.
- Save.
Origin Cache Control
Allows VergeCloud to respect cache settings defined by your origin server.
Key Options
- URL Pattern
Steps
- Open Page Rules.
- Select Origin Cache Control.
- Enter the URL pattern.
- Save.
Timeout Settings
Customizes connection, read, and write timeout durations between edge and origin.
Key Options
- Connection Timeout
- Read Timeout
- Write Timeout
Steps
- Create a new rule.
- Select Timeout Settings.
- Enter timeout values.
- Save.
Send Traffic to Load Balancer
Routes specific URLs to a pre-configured
load balancer for high availability.
Key Options
- URL Pattern
- Load Balancer
Steps
- Create a rule.
- Choose Send Traffic to Load Balancer.
- Select the load balancer.
- Save.
Overrides origin response headers with VergeCloud-defined settings.
Key Options
- URL Pattern
Steps
- Create a rule.
- Select Ignore User Response Header.
- Save.
Sends a custom Host header to your origin server for selected URLs.
Steps
- Create a rule.
- Select Custom Host Header.
- Enter the header value.
- Save.
Cache by Device Type
Creates separate cache buckets for desktop, tablet, and mobile devices.
Steps
- Open Page Rules.
- Enter the URL pattern.
- Enable Cache by Device Type.
- Save.
Secure Link
Restricts content using token-based authentication.
Key Options
- URL Pattern
- Token Validation Endpoint
- Expiration Time
Steps
- Create a rule.
- Enter the URL pattern.
- Add token validation and expiry settings.
- Save.
Web Boost
Optimizes CSS, JS, and images automatically to improve site performance.
Key Options
- URL Pattern
- Optimization Level
Steps
- Create a rule.
- Select Web Boost.
- Set optimization level.
- Save.
Image Resize
Automatically resizes images based on user-defined dimensions.
Key Options
- URL Pattern
- Width/Height
- Resolution
Steps
- Create a rule.
- Select Image Resize.
- Configure dimensions.
- Save.
Adds or modifies request headers sent to the origin server.
Steps
- Create a rule.
- Select Origin Request Headers.
- Add key-value headers.
- Save.
URL Rewrite
Internally rewrites request paths without changing the visible URL.
Steps
- Create a rule.
- Select URL Rewrite.
- Enter the pattern and target path.
- Save.
Considerations
Rule Priority
Only the highest matching rule applies.
Place specific rules above general ones.
URL Patterns
VergeCloud Page Rules use Glob Patterns.
Example:
https://example.com/assets/*
Cache Behavior
HTML is not cached unless explicitly configured.
Origin Cache-Control overrides VergeCloud settings.
Root-level caching requires a separate rule (e.g., /).
Device-Based Caching
Ensure device-specific content is optimized properly.
Redirects
Use 301 for permanent moves and 302 for temporary ones.
Timeout Configuration
Set appropriate timeout values to avoid latency or disconnects.
Image Resizing
Ensure the original image has sufficient resolution.
Secure Link
Choose appropriate token expiry and secure validation endpoints.
Web Boost
Test after applying optimization to avoid script-breaking issues.
Custom Headers
Avoid conflicts with browser or server-sent headers.
Load Balancer Routing
Ensure load balancers are properly configured and healthy.
API Reference
You can automate Page Rule management, VergeCloud provides a complete API collection. You can list, create, update, delete, toggle, and manage exceptions for Page Rules directly through the API.
Testing
After configuring rules:
- Use curl or browser dev tools to inspect headers.
- Use dig for DNS validations.
- Test redirects, images, caching, and path rewrites carefully.