Experience our sturdy EdgeRules feature

Have a full control over how your content is delivered from the pull zone by customizing asset delivery

Unlock a 15-day Trial with our 24/7 customer support to help you.

Take full control over your content with edgerules

Recipes

Designed to help you get started with EdgeRules, our recipes provide you with predefined rules for the most common cases.

bullets 1
servers
Origin Server Optimization

Manipulate headers, reduce the number of calls made to your origin server, create custom redirects, and more.

Go Mobile

Create a better user experience by providing separate caches for mobile and non-mobile devices.

smartphone

Technical Details

Creating a custom Edgerule

You can create 100% custom Edgerules or use and modify other elements shown here. Explore following options laid out in a simple, user friendly format:

HideX powered by Header

Some applications add this header to all HTTP responses and it often contains the application name and version which can be a security risk. This recipe allows you to hide it.

Match Type Default
Features HIDE HEADER X-Powered-By

Hide S3 Headers

Amazon S3 by default adds lots of useless to the user HTTP headers. You can remove them to minimize the transferred data.

Match Type Default
Features HIDE HEADER x-amz-id-2
HIDE HEADER x-amz-meta-s3fox-filesize
HIDE HEADER x-amz-meta-s3fox-modifiedtime
HIDE HEADER x-amz-request-id

Add X-XSS-Protection Header
X-XSS-Protection is an HTTP header understood by Internet Explorer 8 (and newer versions). This header lets domains toggle on and off the “XSS Filter” of IE8, which prevents some categories of XSS attacks.

Match Type Default
Features ADD HEADER X-XSS-Protection “1; mode=block”

Block by Country

This will allow the customer to block certain Countries. In this example, we will return a 403 when a visitor is coming from China (CN).

Match Type Default
Features if ( $geoip_city_country_code = CN ) {
STATUS CODE 403 }

Redirect All Bots

To improve your SEO scores you can redirect all bots that hit the CDN to your origin.

Match Type Exact
Features if ( $http_user_agent ~*
~(crawl|Googlebot|Slurp|spider|
bingbot|tracker|click|parser|spider) ) {
REWRITE RULE ^ https://static.origin.com$request_uri permanent
}

Add X-Pull Request Header

Specify a X-Pull request header key to have the possibility to restrict access to your origin server (X-Pull: [key])

Match Type Default
Features if ($http_x_pull ~* “Your_secret_key”) {
return 405;}

HLS .m3u8

Caching will be disabled for index file .m3u8

Match Type Regex
Features if (Location \.m3u8 ) {
BYPASS CACHE 1
}

Add X-Robots-Tag

You can use this recipe to disallow bots to index different parts of your website. A flexible alternative to robots.txt file.

Match Type Regex
Location \.(?:pdf|htm?l|png|jpe?g|gif)$
Features ADD HEADER X-Robots-Tag “noindex”
ADD HEADER X-Robots-Tag “googlebot: nofollow”

Add X-Frame-Options Header

This header can be used to indicate whether or not a browser should be allowed to render a page in a <frame> or <iframe>

Match Type Default
Features ADD HEADER X-Frame-Options SAMEORIGIN
ADD HEADER X-Frame-Options DENY
ADD HEADER X-Frame-Options “ALLOW-FROM $uri”

CORS Headers

Cross-Origin resource sharing allows other websites to request content from your domain using JavaScript or CSS. Required for web fonts to work.

Match Type Regex
Location \.(ttf|ttc|otf|eot|woff|font.css|css)$
Features ADD HEADER Access-Control-Allow-Origin “*”

Hide Server Header

This recipe allows you to hide the Server header from all HTTP responses.

Match Type Default
Features HIDE HEADER Server

Force HTTPS Connections

Forces the use of HTTPS connections. All HTTP requests will be redirected to HTTPS.

Match Type Default Location /example.html
Features if ( $scheme = http ) {
REWRITE RULE ^ https://$http_host$request_uri permanent
}

Redirect by Referrer

You can redirect all users that come from a specific website. This rule can be used to ban websites that steal bandwidth or show different content from visitors from other websites.

Match Type Exact
Location /example.html
Features if ( $http_referer ~ https://domain.com ) {
REWRITE RULE ^ https://example.com/banned.html permanent
}

Redirect by Country

This will allow the customer to redirect to certain Countries. In this example, we will redirect users from the United States and the United Kingdom to an English version of the website they are visiting.

Match Type Default
Features if ( $geoip_city_country_code ~* (US|UK) ) {
REWRITE RULE ^ https://english.$http_host$request_uri$1 permanent
}

HLS .ts (Live)

This will allow the ts file .ts to be cached for 60 second

Match Type Regex
Features if ( Location \.ts ) {
IGNORE QUERY STRING 1
TTL OVERRIDE 60s
ADD HEADER Cache-Control max-age=60
}

HLS .ts (VOD)

The ts file .ts will be cached for 3600 second

Match Type Regex
Features if (Location \.ts ) {
IGNORE QUERY STRING 1
TTL OVERRIDE 3600s
ADD HEADER Cache-Control max-age=3600
}

Add Canonical Header

Allows you to specify the original domain that should be attributed with the SEO score instead of the CDN accelerated one.

Match Type Regex
Location \.(?:pdf|htm?l|png|jpe?g|gif)$
Features ADD HEADER

Give your customers the best viewing experience.

Corners icon theme cdn
VERVE Media's Logo
IBC Live's Logo
CWS's Logo
IQ Broadcast's Logo
LondonReal's Logo
AnthymTV's Logo
Muuzic Tyme's Logo
Media One's Logo
Interlink Multi Media's Logo
ARV Digital's Logo
SL Media's Logo
VIVRE's Logo
MS Live's Logo
Teletica's Logo
Corners icon theme cdn
Corners icon theme cdn
VERVE Media's Logo
IBC Live's Logo
CWS's Logo
IQ Broadcast's Logo
LondonReal's Logo
AnthymTV's Logo
Muuzic Tyme's Logo
Media One's Logo
Interlink Multi Media's Logo
ARV Digital's Logo
SL Media's Logo
VIVRE's Logo
MS Live's Logo
Teletica's Logo
Corners icon theme cdn

under attack ?

Give us a few details on your attack so that we can save your ship as fast as possible.

Sorry, We can’t provide you with this service

Horem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eu turpis molestie, dictum est a, mattis tellus. Sed dignissim, metus nec fringilla accumsan, risus sem sollicitudin lacus, ut interdum tellus elit sed risus. Maecenas eget condimentum velit, sit amet feugiat lectus. Class aptent

Submitted Successfully!

Thank you for the submitting the details. Please wait for a few minutes and somebody will reach out to you soon. If it's really that urgent, please connect with the Live Chat team to get help right away.