Oct 6 (Reuters) - IAC's digital media arm Dotdash on Wednesday agreed to buy Meredith Corp in a deal valued at about $2.7 billion, bringing titles such as People, Allrecipes and Investopedia under one umbrella.

The combined company is to be called Dotdash Meredith and will be led by Dotdash top boss Neil Vogel, the companies said.

The deal will combine Meredith's more than 40 brands including Better Homes & Gardens, Southern Living and InStyle magazines with Dotdash's digital labels such as The Spruce, Byrdie and Brides.

In June, Meredith had accepted a revised proposal from broadcast firm Gray Television Inc to buy Meredith's television stations business for about $2.83 billion.

Dotdash will buy the remaining portion of Meredith, primarily its magazines unit National Media Group, in an all-cash transaction of $42.18 per share.

On its own, Dotdash currently reaches about 100 million online consumers monthly and its collection of 14 media brands in health, finance and lifestyle are among the fastest growing media brands online. It is one of the rapidly expanding businesses in parent IAC's portfolio.

Television mogul Barry Diller-owned IAC, which is known to build businesses and later list them on the stock market, has successfully spun off online video platform Vimeo and Match Group, owner of online dating services including Tinder and Hinge.

Shares of IAC were up 6.7% at $140.55, while those of Meredith rose 5% to $57.7 in extended trading.

The deal comes four years after Meredith, backed by conservative billionaire brothers Charles and David Koch, acquired Time Inc https://reut.rs/3atR00Z, the publisher of People, Sports Illustrated and Fortune magazines.

The publisher has since sold some titles like Time, Fortune, Money and Sports Illustrated that primarily attracted male readership as it turned its focus on its core women's magazines. (Reporting by Manas Mishra and Subrat Patnaik in Bengaluru; Editing by Shailesh Kuber)