IIS (Internet Information Services)
Cloudflare
IIS (Internet Information Services) is a web server developed by Microsoft for Windows operating systems. Its main function is to host and manage web applications, as well as facilitate communication between web clients and server resources.

Video tutorial

Integrating PERENDER with IIS (Internet Information Services)

Step 1.

Prerequisites:
1. Install and enable the URL Rewrite Module for IIS (https://www.iis.net/downloads/microsoft/url-rewrite)
2. Install and enable the Application Request Routing module for IIS (https://www.iis.net/downloads/microsoft/application-request-routing)

Step 2.

1. Open the Internet Information Services (IIS) Manager.
2. Select your server (A).
3. Double-click on the URL Rewrite module (B).

Integrating PERENDER with IIS

Step 3.

1. Select the View Server Variables... option (A).

Integrating PERENDER with IIS

Step 4.

1. Select the Add... option (A).

Integrating PERENDER with IIS

Step 5.

Add two variables:
1. BOT_AGENT
2. HTTP_Authorization

Integrating PERENDER with IIS

Step 6.

Now we will configure the Application Request Routing module installed in Step 1.
1. Select your server (A).
3. Double-click on the Application Request Routing module (B).

Integrating PERENDER with IIS

Step 7.

1. Select the Server Proxy Settings... option (A).

Integrating PERENDER with IIS

Step 8.

1. Select the Enable proxy option (A).
2. Select the Apply option (B).

Integrating PERENDER with IIS

Step 9.

1. Navigate to the path where your website is hosted.
2. If your website does not have a web.config file, create one and paste the provided code below.
3. If your website already has a web.config file, simply add the PERENDER rule. If your web.config has other rules, the PERENDER rule should be included at the top.
4. Within the provided code, replace [PERENDER_TOKEN] with your token from the PERENDER dashboard of PERENDER.

Repository on GitHub at the following address https://github.com/perender/perender-iis/blob/main/web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <system.webServer>
 <rewrite>
 <rules>
 <rule name="PERENDER" stopProcessing="true">
 <match url="(\.js|\.json|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent|\.ttf|\.woff|\.svg|\.webmanifest|\.webp)" negate="true" />
 <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
 <add input="{HTTP_USER_AGENT}" pattern="(googlebot|bingbot|msnbot|adidxbot|yahoo!\ slurp|qwantify|petalbot|bytespider|sogou\ web\ spider|sogou\ inst\ spider|exabot|seznambot|naverbot|yetibot|yandexbot|yandeximages|yandexaccessibilitybot|perplexity|perplexitybot|oai-searchbot|chatgpt|gptbot|claudebot|cohere-ai|youbot|facebookexternalhit|twitterbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest\/0\.|pinterestbot|slackbot|slackbot-linkexpanding|vkShare|W3C_Validator|w3c-checklink|whatsapp|redditbot|applebot|flipboard|flipboardproxy|flipboardrss|tumblr|bitlybot|skypeuripreview|nuzzel|discordbot|snapchat|viber|mattermost|telegrambot|chrome-lighthouse|lighthouse|google\ page\ speed|siteimprove|serpstatbot|uptimerobot|uptimebot|pingdom|gtmetrix|majestic-12|mj12bot|semrushbot|ahrefsbot|dotbot|screaming\ frog\ seo\ spider|seokicks|rogerbot|360spider|soso|baiduspider-render|bitrix\ link\ preview|xing-contenttabreceiver|integration-test|google-inspectiontool|amazonbot|adsbot-google|googlebot-image|googlebot-news|googlebot-video|facebot|archive.org_bot|paperlibot|dataprovider.com|grapeshotcrawler|zoominfobot|feedly|feedlybot|newsblur|inoreader|ccbot)" />
 <add input="{QUERY_STRING}" pattern="_escaped_fragment_" />
 </conditions>
 <action type="Rewrite" url="https://api.perender.com/render?url={HTTP_X_FORWARDED_PROTO}://{HTTP_HOST}{REQUEST_URI}&amp;botAgent={BOT_AGENT}" appendQueryString="false" logRewrittenUrl="true" />
 <serverVariables>
 <set name="BOT_AGENT" value="{C:0}" />
 <set name="HTTP_Authorization" value="Bearer [PERENDER_TOKEN]" />
 </serverVariables>
 </rule>
 </rules>
 </rewrite>
 </system.webServer>
</configuration>


Powered by AstrolUi
An unhandled error has occurred. Reload 🗙