Ricciardo announced earlier this month he would be leaving Renault at the end of the season to join McLaren next year, replacing Ferrari-bound Carlos Sainz.
Ricciardo had been linked to the Ferrari drive following Sebastian Vettel's exit, having previously held talks with the team over a race drive back in 2018 when he was with Red Bull.
The Australian has revealed these talks extended into this year as Ferrari considered a replacement for Vettel, only for the team to strike an agreement with Sainz.
"There have been discussions already from a few years back, and that continued all the way through to now," Ricciardo said in an interview with CNN.
"I won't deny that, but obviously it's never really come to fruition.
"I've never really chose to dive too deep into it. Everyone says it would be a good fit, obviously, with my name and all the background stuff, but I try not to get emotionally caught up in any kind of situation."
Ricciardo said he understood why Sainz had got the seat following the Spaniard's impressive 2019 season that saw him score McLaren's first podium in nearly six years.
"I see how Carlos is a fit for the team. So I don't really look at it like 'why not me?'" Ricciardo said.
"Carlos had a very strong 2019. He's a bit of hot property right now, and I guess it's a good fit for where they are at."
Ricciardo also held talks with McLaren over a drive back in 2018 when considering his options for 2019 and beyond, before eventually signing with Renault.
The seven-time grand prix winner said there was no single moment or factor that prompted him to quit Renault and join McLaren this time around, saying there is no "black and white answer".
"There wasn't any moment, which was like a light bulb and said: 'Yes, that's what I need to do.'" Ricciardo said.
"Equally, there wasn't something I saw in McLaren, which created that or there wasn't something in Renault, which created the moment of 'I have to move on.'
"The discussions with McLaren go back to even before 2018, and I guess continued over time.
"Obviously it's not an overnight decision. I guess to compare as well the two [teams], I don't think that's fair."