This section expands our ads.txt setup article to cover steps on setting up a 301 redirect for Windows (IIS) web servers.

  • Ensure the rewrite module is installed (see here for Microsoft’s documentation)

  • Open web.config in the root of your site

  • Add the following configuration in the file, replace #### with the ID of your property, found in your site list in the NitroPay panel.

        <rule name="NitroPay">
          <match url="ads\.txt" />
          <action type="Redirect" redirectType="Permanent" url="" />
  • Save the file, build and deploy your website.

  • Test that the redirect works by going to and noting that the URL and contents changed to the hosted ads.txt.

Did this answer your question?