The reaction is as follows:
Phenol is dissolved in sodium hydroxide solution to give a solution of sodium phenoxide.
The solution is cooled in ice, and cold benzenediazonium chloride solution is added. There is a reaction between the diazonium ion and the phenoxide ion and a yellow-orange solution or precipitate is formed.
The product is one of the simplest of what are known as azo compounds, in which two benzene rings are linked by a nitrogen bridge.
Since phenol should lose H+ ion ,basic medium is required.