Acting Prime Minister Barnaby Joyce says he is a "lesson to all" on why you should wear a hat to avoid skin cancer.

Mr Joyce is currently using a cream to burn off skin cancers on his forehead, cheek and temple.

He told the ABC that Australians who work outdoors should take greater care in the sun to avoid cancer.

"Now I'm paying the price for working on the land and dealing with the [ravages] of the sun," he said.

"Big hats might look silly, but skin cancers look sillier."

Mr Joyce regularly wears a broad-brimmed hat, but he said that was not always the case.

"They used to think it was uncool … so I just wore those small ones and of course they just didn't do the job," he said.

It is the third time this year he has been treated for skin cancer.

In January, Mr Joyce had surgery to remove a stage one melanoma from his right shoulder.

He also had to take time out of the election campaign to have another surgery to remove a cancer from his neck and face.

Mr Joyce also shared his experiences with constituents on Facebook, saying the current treatment would last for a few weeks but he was "on the road to recovery".