IP address hashing

Abstract

Describes the different ways securely conceal IP addresses in the xDB.

All contact IP addresses are hashed when they are saved to the xDB database. There are two settings in the Sitecore.Analytics.config file that specify how the IP addresses are stored:

Setting

Description

Analytics.RedactIpAddress

If true, all IP addresses are stored as 0.0.0.0 in xDB and all IP address identification is lost. 

The default setting is false. When this setting is false, real IP addresses are stored.

Sitecore.Analytics.Lookups.IpHashProvider

This provider is always used. It hashes IP addresses using the MD5 hash algorithm. The setting contains the salt parameter used by the hashing provider. For security reasons, it is best practice that you specify at least six characters for the salt parameter. When you have specified a value, do not change this value again. If you do, visits from an IP address that is already stored as a hash will not be recognized and will be stored with a different hashed value.

Note

Sitecore provides a tool called Hash Stored IPs. You use this tool when upgrading from a version earlier than Sitecore 8.1, where IP addresses were not hashed. You must only use this tool on the xDB MongoDB database.

Note

IP addresses are always hashed in the Geoips collection.