Broadband antireflection coatings via sol-gel processes have find wide applications in a variety of optical areas. However, to adjust refractive indices of coatings, most sol-gel methods involved complicated processes that modify the microstructures of sol particles. Here, we find that ammonia treatment of the sol-gel silica coatings can significantly tailor their refractive indices. Based on the findings, we created broadband antireflection coatings through preparing two-layer coatings. The coatings comprised two layers: a bottom layer with a high refractive index via ammonia treatment of the sol-gel silica coating, and a top layer with a low refractive index from the normal sol-gel coating. The two-layer coatings demonstrated broadband antireflection characteristics, with transmittance higher than 98 % from 350 to 1400 nm. Further hexamethyldisilazane treatment led to formation of hydrophobic coatings, which exhibited high environmental stability. The study demonstrates a new and simple method to create broadband antireflection coatings, and the broadband antireflection coatings could be attractive in many areas, such as solar cells and high-powered laser system.