Robbie Williams has encouraged his fans to think twice before they post hurtful comments about celebrities online.

The Rock DJ hitmaker took to Instagram on Friday to share an illustration of an email thread between him and former One Direction star Liam Payne, who died on Wednesday aged 31.

In the lengthy caption, Robbie remembered acting as a mentor to One Direction and performing with the five-piece during the final on The X Factor in 2010.

"How to make sense of the Liam Payne tragedy?" he began. "Obviously, my first feelings towards his passing were like everyone else. Shock, sadness and confusion. And to be honest as I write these words that's where I still am.

"I met the boys on The X Factor and 'mentored' them. I use the word mentored in inverted brackets cos I hardly did anything to be honest. I just hung out with them. They were all cheeky and lovely."

He noted that Liam's "trials and tribulations were very similar" to his own, as they had both been in boy bands before going solo and had struggled with substance abuse. Liam got sober last year but was reportedly under the influence when he fell from a hotel balcony in Buenos Aries, Argentina on Wednesday.

"I still had my demons at 31. I relapsed. I was in pain. I was in pain because I relapsed. I relapsed because of a multitude of painful reasons. I remember Heath Ledger passing (in 2008) and thinking 'I'm next'. By the grace of god and/or dumb luck I'm still here," the former Take That member continued.

Addressing the email in which he told Liam he was "very proud" of him in June 2022, Robbie added, "It made sense to reach out and offer what I could. So I did."

The 50-year-old entertainer then implored his followers to be kinder and more compassionate to others online, insisting that celebrities are real and "immensely sensitive" people. He encouraged them to cut others slack before passing judgment because nobody knows what "they're going through".

"We can be kinder. We can be more empathic. We can at least try to be more compassionate towards ourselves, our family, our friends, strangers in life and strangers on the internet," he wrote. "Even famous strangers need your compassion."

LATEST NEWS