I want to purify indomethacin in ethanol but the problem is the formation of ester impurity due to esterification of acid part of indomethacin with ethanol. Is there any way to prevent estrification?
That type of esterification is usually acid-catalyzed. Have you tried adding a bit of base and isolate the indomethacine as a salt? Or do it mixed with water, which reduces the chance of esterification (especially if you need to heat it to recrystallization)
Alternatively you could try 2-propanol as a recrystallization solvent again with or without added water.