In the United States, at least, a monopoly isn't illegal per se. A monopoly is illegal only if it was achieved by improper means, or if the monopolist abuses its power.
Also, having a monopoly or near-monopoly is no guarantee that a company will continue to enjoy that position. Example: Archer Daniels Midland once had a dominant share of the ethanol market; its market share is now about 20%. And that's in a sector where the cost of entry is much higher than in Internet advertising.