In November, the utility DC Water warned that a broken pipe “made it possible for bacteria or other disease-causing organisms to enter the water through cracks, breaks or joints in the distribution system.”

It was the second time last year that Washingtonians were warned not to drink tap water unless it was boiled first.

The question to ask yourself: How much “bacteria or other disease-causing organisms” did I drink before I heard the warning?

As if that’s not enough, the Environmental Working Group, a nonprofit, nonpartisan group that aims to protect human health and the environment, found significant levels of polyfluoroalkyls — “forever chemicals” linked to health hazards — in 20 cities, including the District.

This is where home water filtration comes in. While the U.S. water source is among the safest in the world, filtration can make water better, protecting appliances such as dishwashers and hot water tanks from premature failure, removing unwanted taste and odors from tap water, and adding in minerals and compounds that supply what the industry calls “polish,” making it more pleasing to drink.

But choosing the right filtration is not as easy as yelling, “Hey, Culligan Man!” There are hundreds of products, most of which work on one or two specific water problems, and some that don’t do much at all. “This is a very snake-oily sector,” said John Pujol, chief executive officer of SimpleWater, a testing company endorsed by the Water Systems Council, a trade group representing well owners. “Not just water testing, but the water sales industry.”

It helps to know a bit about filtration itself. There are broadly two categories of filters that do two very different things. One removes sediment and large particles from water, which can save your showerhead from scale and protect your appliances from a buildup that can shorten their lives. The other category removes health hazards such as arsenic, lead, bacteria and viruses. Although there may be some overlap, don’t expect any filter to do both.

Before you know what filter to shop for, you have to know what you need removed from your water. “What we recommend is to test your water to see what you are concerned about,” said Eric Yeggy, director of technical affairs for the Water Quality Association, a trade group that represents the water treatment industry. “Then you can look for products certified for that problem.”

If you aren’t on a well system, your utility can give you its federally mandated Consumer Confidence Report. It tells you what your water has been treated for and its quality after treatment.

While useful, the report doesn’t account for what might happen to your water between the facility and your tap. If you have old lead or cracked underground pipes, what comes from your tap may be different from what comes out of the treatment facility. For well-water users, testing is more critical and should be done yearly, especially now that portions of the Clean Water Act are being rolled back.

The Environmental Protection Agency has a list of labs certified to test drinking water. It takes some digging to get to local labs, and you then may find that most of those listed are set up for industrial testing, not for homeowners.

The Water Systems Council endorses a mail-in water test from SimpleWater called Tap Score. Tap Score doesn’t actually do the testing, but it gets your samples to certified commercial labs that may not be prepared for consumer trade. It sends you a water testing kit to mail back. Then you get an easy-to-understand explanation of the results and recommendations for what kind of filter (or filters) would be best for your home.

Even careful testing has its limits, though. “Testing is not going to cover what happens in a boil-water event,” said Tom Palkon, executive vice president of the Water Systems Division at the International Association of Plumbing and Mechanical Officials (IAPMO). If you are worried about those boil-water events, you also have to guard against what you would expect to find in your water when they happen.

Tap Score offers a number of different tests, and you can use its live-chat function to ask which is best for you. City water tests range from $140 to $650. There also are tests that can be purchased a la carte for certain specific impurities. I sent for the local Consumer Confidence Report, and based on that, the recommendation was for the $250 Advanced City Water Test, plus $6 H2S test strips because our water smells of sulfur.

The next step is to find a filter certified to fix the specific problem. That’s not as easy as it sounds because certifications are often misused.

Several organizations certify filters, but foremost among them are the Water Quality Association, IAPMO and NSF International (originally the National Sanitation Foundation). All test in the same fashion using methods established by NSF International and the American National Standards Institute (ANSI). Here’s where it gets tricky.

There are different ANSI tests for different impurities. For example, the test to determine whether a filter reduces chlorine, (NSF/ANSI 42, if you’re wondering) tests only for that.

A filter maker can run the test itself and legitimately claim, “Verified to NSF/ANSI 42 standards for Chlorine.” Or it can go to an organization such as IAPMO for a one-time test and say something like, “Verified by IAPMO to reduce Chlorine.” Or the manufacturer can step up to a full certification, which generally means there is not only an initial test but also ongoing testing and monitoring to make sure the product stays in compliance. Yet even that depends on how the certifying group chooses to monitor.

Some unscrupulous manufacturers may use one test result to imply its filter does more than it really can. If it just says something like “ANSI TESTED!” and “Removes more than 200 contaminants!” you have to check exactly which tests were conducted for which contaminants, by whom, and whether it was a one-time test or part of an ongoing program.

Because no single filter fixes every problem, you may need a combination of them to treat all of your water issues.

The most basic is a particulate filter that removes large particles such as dirt, rust and loose scale from your water. It can make cloudy water more clear, but it doesn’t remove bacteria.

Adsorption filters, typically activated charcoal, also trap particles but usually of impurities such as VOCs (volatile organic compounds, like benzene and formaldehyde), polyfluoroalkyls, pesticides and chlorine that can make water taste bad.

Water softeners remove metals from water that make it better at rinsing soap from laundry and off your body when showering. They can reduce scale in your pipes and appliances, extending their lives. Softeners may incidentally reduce lead and copper.

Reverse osmosis uses an electrically charged membrane to separate water from dissolved solids such as lead, copper and arsenic. It removes most contaminants but not VOCs.

Ultraviolet filters use light to kill biological contaminants, such as protozoa cysts, bacteria and viruses.

Distillation heats water into steam. The water vaporizes, solids are left behind, and the heat kills bacteria. The system collects the clean evaporated water.

After all of that filtering, water sometimes has an uninspiring blandness — even for water. The minerals and trace elements that give water character have been stripped out. If you have a favorite brand of bottled water, it’s probably because you like its mix and concentration of minerals.

A final filter can “remineralize” the water, usually adding back calcium, magnesium and adjusting the acidity. “Having some minerals in there creates a more pleasant taste,” said Rick Andrew, global business development director of water systems for NSF.

As helpful as filtration is, no one gives these systems away. “You can spend $30 on a Brita, up to whole house reverse-osmosis system that costs a few thousand dollars with ongoing maintenance,” said Dan DiClerico, home expert for HomeAdvisor.com, which connects homeowners and contractors. It keeps statistics on the costs of completed jobs.

Based on HomeAdvisor’s national averages, whole house water softeners cost about $3,000, including installation. “There are companies that will lease them $50 to $10 a month,” DiClerico said. “If you purchase them outright, there are some ongoing costs associated.” On average, he said, maintenance costs about $100 a year.

People who treat for contaminants most often buy a multistage system that goes under the sink; the average cost is $1,800, including installation. Maintenance ranges from $100 to $200 a year.

SimpleWater’s Pujol stressed the importance of replacing filters on the recommended schedule. “You need to maintain the unit. If not, forget about it,” he said. “If your filter is full, where do you think that lead goes? Probably back into the water. They start to work in the opposite direction.”

The costs may be offset by the amount you save on bottled water: Back-of-the-napkin math shows our family is paying about $1,650 a year. Plus, your conscience won’t ache when you toss yet another plastic bottle into the recycle bin.