Posting a piece of content to the Internet and having it go viral can seem like some odd combination of alchemy and luck. In fact, there's more science to it than you might think. That's good news because you can use that science to your advantage and create content that will get shared, and shared, and shared some more. All you need is to know how.

To find out, I talked to Emerson Spartz, founder and CEO of Spartz Media and creator of Dose, OMG Facts, and the Harry Potter site Mugglenet. Though you may never have heard of Spartz or visited any of these sites, if you spend any time at all on Facebook, you've almost certainly seen-and very likely shared-Spartz media content (such as this video of a grizzly bear enjoying a swimming pool).

Dubbed "The Virologist" in a lengthy New Yorker profile, Spartz has been creating content sites since high school and is responsible for some of the most shared content the Internet has ever seen. He's spent much of his life studying the science of virality. He may know more about what makes content go viral than anyone on Earth. Here are some things he says will do the trick:

1. Strong positive emotions.

"Most content goes viral because it creates a large amount of emotion," Spartz says. "For an article, picture, or video to inspire you to share, it has to be on a whole different level from other content." Positive emotions work better than negative ones he adds, which is why things like nostalgia, kittens, and babies tend to be effective.

2. Righteous anger.

The one exception to the positive-emotions-only rule is anger, Spartz says, particularly anger brought on by injustice. "We feel like we're making the world a better place by sharing something we feel angry about because we're sharing our perspective or someone else's perspective on this issue," he says.

3. Content that reflects well on the sharer.

"We're signalling the kind of person we are when we share so we share content that makes us look good," Spartz explains. "Before we share something, our subconscious is always asking, 'If I share this, will it make me look cool?' This is why nobody shares porn." It's also why some people share lengthy or erudite articles they haven't actually read, he adds.

4. Incentives.

Offering someone a reward or a discount for sharing your content is a straightforward and extremely effective way to achieve virality, Spartz says. "There are two types of virality: incentive-based and emotion-based. Incentive-based for most businesses is by far the easiest way."

5. Content that's gone viral in the past.

Past virality is the best predictor of future virality, Spartz notes. "The same content tends to go viral over and over, so that is a way of creating content that has more viral lift to it." So consider retweeting viral tweets and doing roundups and other curation of content that's been shared a lot in the past.

6. Tested effective headlines.

Spartz Media has sophisticated software for testing headlines, but even if you don't, you can do an informal test to get a good idea of what will and won't work. "Write 15 headlines to go with your content, send them to a bunch of your friends and ask them to pick the top 5," Spartz says. "Then look for those that got a lot of votes. Even this little bit of testing will go a long way toward getting people to consume your content."

More: