For some rock and roll fans it may forever be "only baloney". But Roy Orbison devotees are about to be able establish for sure that the singer was in fact warbling "only the lonely".

The age-old confusion over song lyrics, a source of fascination to some and frustration to others, is about to be cleared up, thanks to the internet. Under a deal between leading US publishers and Yahoo.com, authorised music lyrics will for the first time be offered on a website.

"You mean Bob Dylan isn't actually saying 'The ants, my friend, are in a bowling pin?'" said Ian Rogers, general manager of Yahoo! Music. "Finally, a free, legal and definitive way to settle a bet with the guy sitting next to you at the bar who is certain the Ramones' most famous anthem declares 'I wanna piece of bacon'. It fills a huge gap out there."

Initially, Yahoo's database will include the lyrics to 400,000 songs by 9,000 artists, ranging from the Beatles and Bob Dylan to Prince and Beyoncé. Nearly 100 music publishers, including BMG Music Publishing, EMI Music Publishing, Sony/ATV Music Publishing, Universal Music Publishing Group, and Warner/Chappell Music, have signed up to the deal.

"We think we can build a really healthy business for lyrics and I think publishers stand to gain quite significantly from this new revenue stream," Mr Rogers said. "With the popularity of lyrics on the internet, advertisers want to be there. This is definitely a selling point."

Music lyric searches are a popular aspect of the internet, and Yahoo hopes to cash in on the trend by charging for any advertising accompanying the lyrics.

"Song lyrics are continually among the top 10 searches performed on major search engines, though the results often [give] consumers a frustrating experience filled with inconsistent and incomplete lyrics, and annoying pop-ups," said Craig Palmer, president of Gracenote, the digital media company offering the service in partnership with Yahoo.

Mr Palmer said that within 10 years the revenue from licensing lyrics this way would reach $100m a year, boosting the current worldwide music publishing revenues, estimated at $4bn annually.

The deal comes at the end of years of negotiations between leading publishers searching for a service that would provide revenue and counter the success of unauthorised websites. Dozens of websites, with names such as lyrics.com and azlyrics.com, offer free lyrics, but the music publishing industry, represented by the Harry Fox Agency, has taken legal action to shut down many of them.

"The major advantage is that they're going to start getting paid for something that has been available for free," said Phil Leigh, an analyst with Inside Digital Media, who added that he thought publishers had been adapting to the internet "at the speed of a glacier". He said: "It's just taken the publishers a long time to get their act together."

Other sites, such as Google and iTunes, will probably follow suit.

"We wouldn't be in the business to launch just one service, so stay tuned," said Mr Palmer.

Word play

Everyone's suffered a lyrical faux pas. A friend was once heard singing along to Prince with the words "Do you recollect?" The fact the song was named Little Red Corvette did not seem to offer a clue. Obtuse personal interpretations aside, there is also the often misquoted "Rebel, Rebel put on your dress", Bowie's actual words being "Rebel, rebel, you've torn your dress". There's no excusing those who missed the point entirely in Jimi Hendrix's Purple Haze, singing "Excuse me, while I kiss this guy". The sky, surely?

Rosie Swash