(i) From hydrocarbons by electrophilic substitution
Aryl chlorides and bromides can be easily prepared by electrophilic substitution of arenes with chlorine and bromine respectively in the presence of Lewis acid catalysts like iron or iron(III) chloride.
The ortho and para isomers can be easily separated due to large difference in their melting points.
Reactions with iodine are reversible in nature and require the presence of an oxidising agent (HNO3 , HIO4 ) to oxidise the HI formed during iodination.
Fluoro compounds are not prepared by this method due to high reactivity of fluorine.
(ii) From amines by Sandmeyer’s reaction
When a primary aromatic amine, dissolved or suspended in cold aqueous mineral acid, is treated with sodium nitrite, a diazonium salt is formed.
Mixing the solution of freshly prepared diazonium salt with cuprous chloride or cuprous bromide results in the replacement of the diazonium group by –Cl or –Br.
Replacement of the diazonium group by iodine does not require the presence of cuprous halide and is done simply by shaking the diazonium salt with potassium iodide.