Types of tannin compounds occur naturally in most surface water supplies, which is why it's generally a lot easier to remove them with water filter systems or ion exchange resins rather than trying to prevent them in the first place. Shallow wells are more likely to contain a high tannin content, however, so if you're considering building a well for your home, make sure it's deep enough to avoid surface water supplies if possible. It's also important that your wells are well-built and don't have any cracks or holes to make it easy for tannin particles to get inside.