Turn on the radio today, and you're likely to hear "Old Town Road."

The song by 20-year old rapper Lil Nas X featuring country superstar Billy Ray Cyrus fuses elements of both genres, and it has catapulted to the top of the charts since its release in April.

With 17 weeks at No. 1 on Billboard's Hot 100 chart, "Old Town Road" pulls ahead of an elite group of songs that held the record for the longest reign on top. The 2017 Latin sensation "Despacito" by Luis Fonsi, Daddy Yankee and Justin Bieber and "One Sweet Day" released by Mariah Carey and Boyz II Men in 1995 previously shared the record at 16 weeks, according to Billboard.

While the song has catapulted Lil Nas X from aspiring musician in Georgia to global superstar, it didn't take much money at all to create the smash hit. Lil Nas X wrote "Old Town Road" himself using a beat he bought for just $30 on the online platform BeatStars.

BeatStars is a digital marketplace that allows producers to sell their original beats to artists. Producers pay a monthly fee to use BeatStars and get to keep 100% of their sales revenue when artists buy their beats on the platform. The company has paid out over $50 million to producers since 2012, CEO Abe Batshon told CNBC Make It. Batshon said that the music on BeatStars ranges from $20 to $200 for a non-exclusive contract, with increasing prices for more exclusive rights.

A 19-year old from the Netherlands known as YoungKio created the "Old Town Road" beat, incorporating a sample from the song "34 Ghosts IV" by rock legends Nine Inch Nails. Lil Nas X purchased the beat in 2018 for $30, which came with limited distribution rights. After the song exploded in popularity, the pair negotiated a new contract, said Batshon.

Following the success of "Old Town Road," YoungKio's sales spiked on BeatStars. In June, he announced on Instagram that he signed a deal with Universal Music Group.

"Lil Nas X has played such an important role in making sure his fans and all the people that are fans of the song are aware of YoungKio and his contribution to the song," Batshon said. "Not a lot of artists do that."