White Mountains Insurance Group Ltd. purchased a majority stake in Tranzact for $178 million as the insurer renews its bet on policy sales through the Internet.

White Mountains acquired 63 percent of Tranzact, which operates DirectHealth.com, the online insurance comparison site that struck a deal this month to help Wal-Mart Stores Inc. shoppers pick coverage in about 2,700 stores, the insurer said in a statement today. Veronis Suhler Stevenson was previously the majority owner of Fort Lee, New Jersey-based Tranzact, which also runs AutoInsurance.com.

White Mountains Chief Executive Officer Ray Barrette is counting on the trend of more consumers buying insurance online. His Hanover, New Hampshire-based company took control of Answer Financial in 2008, the year in which he acquired a 42 percent stake of the debt and equity in the online insurance marketplace for $30 million, helping it recover from bankruptcy. Barrette sold online car insurer Esurance and Answer Financial in 2011 to Allstate Corp. for $1 billion.

“Tranzact is uniquely positioned to help insurance companies reach consumers,” Barrette said in the statement.

Veronis Suhler focuses on industries including business services and health-care information technology. The New York- based firm said in a separate statement that it has managed six private investment funds since 1987, with aggregate initial commitments of more than $3 billion. Petsky Prunier Securities LLC was Tranzact’s bank, and Lowenstein Sandler LLP provided legal advice. White Mountains used Cravath, Swaine & Moore LLP.

Tranzact completed a recapitalization after the purchase that allowed for the return of $44 million in capital to White Mountains, according to the White Mountains statement.