The mayor might not like to take questions from the press — but he does believe they have the right to join a union.

De Blasio was among nearly two dozen city officials who signed a letter Thursday in support of reporters at two popular local websites who are fighting to get management to recognize their recent union vote.

“We support the editorial staff of DNAinfo and Gothamist as they exercise their right to unionize,” the letter said.

“The work of these reporters and editors is crucial for NYC. We call on management to respect their democratic right to organize and immediately recognize their union,” it concluded.