Home > Knowledge Base Articles > How to Add X-Forwarded-For heading and enable IIS logging

How to Add X-Forwarded-For heading and enable IIS logging

This article applies to the following products:

  • IIS

Summary

Configure IIS to add the X-Forwarded-For header via request filtering, then enable custom IIS logging fields to capture client IPs, ensuring accurate logs behind load balancers or proxies.


Steps

  • Navigate to IIS > Default Website
  • Click on Logging 

  • Click on Select Fields and Add Field

  • Set the Field name and Source as: X-Forwarded-For
  • Set the Source Type as: Request Header

  • Click OK and then Click Apply

The IIS logs are located here C:\inetpub\logs\LogFiles\W3SVC1