The amino group is a strong activator, orienting to ortho/para. However, in acid media it is protonated, transforming into a strong deactivator (ammonium salt) that orients to the meta position.
Protonation of the amino can be avoided by protecting it with ethanoyl chloride in pyridine.
Aniline nitration without amino protection
Nitration of aniline with protection of the amino group, using ethanoyl chloride
Amino protection can be done with ethanoic anhydride in pyridine, or with ethanoyl chloride in pyridine.
The final product is an amide, much less basic than the starting amine and less prone to protonation. The mechanism of the reaction is as follows:
Stage 1. Addition
Stage 2. Acid-base balance
Stage 3. Elimination
The amide formed is deprotected by acid or basic hydrolysis, leaving the aniline free.
Deprotection mechanism in basic medium.
Step 1. Addition of the hydroxyl group to the amide
Stage 2. Elimination
Stage 3. Acid-base balance