Skip to content
  • There are no suggestions because the search field is empty.

IIS Integration

Integrate Prerender.io with IIS by using URL rewrite rules configured directly in your server—no need for middleware installation. This guide is for developers or DevOps teams who manage websites on Windows Server environments using IIS. It's ideal for SEO-focused deployments that require prerendering for bots without changing the app architecture.

 
 

Note for Azure users: The Azure App Services URL rewrite rules do not support custom domain forwarding. Please follow the dedicated Azure IIS integration guide instead.

Video guide

Prerequisites:

 

Step-by-Step Integration Instructions

Step 1 – Enable ARR Proxy in IIS

  1. Open IIS Manager
  2. Select your server from the Connections panel
  3. Double-click Application Request Routing Cache
  4. Click Server Proxy Settings in the right-side Actions menu
  5. Check Enable proxy, then click Apply

Step 2 – Define Prerender Token as a Server Variable

  1. Go to IIS Manager > Sites > Your Site > URL Rewrite
  2. Under the Server Variables section, add a new variable:
    • Name: HTTP_X_PRERENDER_TOKEN
    • Value: [YOUR TOKEN]
    • Check "Replace the existing value

Step 3 – Create Rewrite Rule in URL Rewrite

  1. Click “Add Rules…”, then choose Blank Rule
  2. Name the rule (e.g., “Prerender.io Rewrite Rule”)
  3. Set the “Match URL” section with the following:
    • Requested URL: Does Not Match the Pattern
    • Using: Regular Expressions
    • Pattern:
      (\.js|\.json|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.doc|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent|\.ttf|\.woff|\.svg)
    • Check “Ignore case” 
       if your site URLs are case insensitive
  4. Add Conditions:
    • Rule 1:
      • Condition Input: {HTTP_USER_AGENT}
      • Pattern:
        googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest\/0\.|pinterestbot|slackbot|vkShare|W3C_Validator|whatsapp|redditbot|applebot|flipboard|tumblr|bitlybot|skypeuripreview|nuzzel|discordbot|google\ page\ speed|qwantify|bitrix\ link\ preview|xing-contenttabreceiver|chrome-lighthouse|telegrambot|google-inspectiontool|Perplexity|OAI-SearchBot|ChatGPT|GPTBot|ClaudeBot|Amazonbot
      • Check “Ignore case”
    • Rule 2:
      • Condition Input: {QUERY_STRING}
      • Pattern: _escaped_fragment_
  1. Set Logical Grouping to Match Any

Step 4 – Set the Action

  1. Action Type: Rewrite
  2. Rewrite URL:
    https://service.prerender.io/https://{HTTP_HOST}/{REQUEST_URI}
  3. Make sure to:
    • Uncheck “Append query string”
    • Optionally enable: “Log rewritten URL” and “Stop processing of subsequent rules” (for clarity and debugging)

 

Configuration Notes / Options

  • If your application uses special characters in URLs, change:
    Rewrite URL:
    https://service.prerender.io/https://{HTTP_HOST}/{UNENCODED_URL}
  • To support this behavior, set useOriginalURLEncoding to false in your IIS Configuration Editor.
  • This guide assumes that your IIS server is publicly accessible from the Internet. For local environments or dev testing, point to your open-source Prerender instance (e.g., http://localhost:3000) instead of https://service.prerender.io.
  • This setup guide is just a template. Your application may have special needs that need to be reflected in these rules.

 

Verification

To confirm the integration is working:

  • Simulate a crawler request (e.g., with a User-Agent like Googlebot) to your site.
  • Check the response headers and see if the page is being served by Prerender.io.
  • Use this guide to verify correct rendering behavior end-to-end.

 

Related Articles / References