One lesson sticks out in John Harding’s mind more than any other.

During a meeting, the YouTube engineer says his team showed off some everyday screenshots of the site. "This is how you see YouTube today," he remembers someone saying. "And this is how your three-year-old sees YouTube." The images shrank. And written over everything were the same words: "blah blah blah."

The point may seem obvious: YouTube doesn't look the same to everyone. But at the time, there was only one YouTube. That's changed, and for good reason.

After a decade of growing up as the pioneer of Internet video, YouTube still commands a massive audience. It has more than a billion users. It reaches more 18-to-49-year-olds than any cable network in the US on its mobile app alone. And the average mobile viewing session is now more than 40 minutes long. But other contenders are forcing YouTube to take seriously the idea that another site could overtake it. Facebook (especially with live video), Snapchat, and Amazon are all in the running.

To stay ahead, YouTube has done what any good investment strategist would advise: it's diversified. YouTube has become many YouTubes. Each one commands a specific niche. It sounds counterintuitive—but to lock in the broadest possible audience, YouTube is figuring out how to go narrow.

Immersion Excursion

In addition to the original YouTube app, the company now has three other apps devoted to distinct niches—YouTube Music, YouTube Kids and YouTube Gaming. Harding says the decision to go with those categories came out of breaking down which areas of interest had large, growing audiences with distinct enough habits to merit creating a separate space that catered to their unique ways of using YouTube.

All that comes through in YouTube Kids. When you launch the app, large, vivid thumbnails jump out at you against an audio backdrop of playful tunes. You can search the trove of kid-friendly content by voice—little text remains beyond very simple video titles. YouTube has engineered the look and feel to encourage kids to immerse themselves in the product for hours.

To stay ahead, YouTube has become many YouTubes.

And immersion is exactly what YouTube needs to stay competitive. Facebook has proven its ability to command users' time on mobile devices; now, thanks to a concerted push from Facebook, users spend more and more of that time watching video. Google doesn't have something comparable to Facebook's News Feed; the whole point of search is to find the link you're seeking and click away from Google to your ultimate destination. That fleeting attention is anathema to advertisers.

That puts pressure on Google-owned YouTube to generate more views, longer watch time, more overall "engagement." YouTube has long been the place you visited to watch that viral video all your friends were talking about. But Google needs YouTube to be the place viewers don't just go but also stay.

An Embarrassment of Rich (Videos)

YouTube's struggle for "stickiness" is, ironically, a symptom of its success. Three former PayPal employees founded YouTube way back in February 2005 and sold it to Google less than two years later for $1.65 billion—an astounding price for a startup in the early aughts but now widely seen as a bargain. YouTube has become the world's leading repository of online video, a site synonymous with the medium it delivers. So what's the problem? The more video YouTube has, the harder the challenge of finding, filtering, and delivering the right videos to everyone to ensure they'll stay interested and stay on the site.

Sure, it’s pretty easy for YouTube to hook you with a clip some friend of yours recommended. But then what? The company has been working on several answers, including recommendations based on machine learning techniques that automatically probe users’ viewing histories and predict what they want to see next. The company is also experimenting with in-app messaging that lets friends share videos without ever leaving YouTube.

YouTube’s latest moves don’t have the flavor of a company that’s floundering.

Standalone apps devoted to specific interests, meanwhile, are the company's broadest attempt to keep users locked in. Kids, music, and gaming are good places to start because YouTube has such strong endemic audiences for each, says Sarah Baehr, managing partner of digital investment at Horizon Media. These viewers, in other words, can’t get what they’re getting from YouTube anywhere else, least of all television (or Netflix). “They’re less tethered,” Baehr says.

For example, having an app filtered for kid-appropriate content lets parents hand over a tablet to a child without having to worry, says eMarketer senior analyst Paul Verna. YouTube Music takes advantage of YouTube’s position as perhaps the Internet's deepest trove of online music. Gaming caters to an obsessive audience that loves over-the-shoulder game-watching.

In branching out, analysts say, YouTube is taking advantage of one asset its competitors can't best—time. YouTube has had more than a decade to build a clear identity for itself. In the early days, Baehr says YouTube had to spend a lot of time convincing advertisers it wasn't just about cat videos. "There was a legitimacy issue it was dealing with."

To lock in the broadest possible audience, YouTube is going narrow.

Those days are long gone. YouTube has defined new genres of video and a whole new kind of celebrity. But that success is the same reason it can't be complacent. So many others are chasing YouTube's audience, both broadly and in the same niches YouTube is trying to definitively claim for itself. Amazon-owned Twitch has huge cachet in online game-streaming. Spotify and Apple Music stream both music and music videos. HBO shows Sesame Street. If YouTube hadn't gone narrow, it may have ceded these niches to competitors.

At the same time, YouTube’s latest moves don’t have the flavor of a company that’s floundering, Verna says. It's a giant that doesn't show signs of fading. “I see YouTube as a company that faces a lot of competitive threats, but not existential threats,” he says. You could see YouTube breaking itself into more parts as a kind of dilution. But YouTube's standalone apps seem more like a way for YouTube to multiply its force.