You will end up killing a fair amount of fauna and coralline that way. Depending on the crew in your tank, the easiest way to deal with hair algae is manual removal and greatly reduced nutrient. The main culprit will be PO4
in most cases so I would suggest getting that tested and ensure you only use a pure water source like RO
for top off and water changes.
Once you eliminate the cause, the algae will usually go with it. A good way to remove it is with a toothbrush. It's a bit labour intensive but very effective. Once trimmed down a kept short, the animals will have a better opportunity to control it. If too long, most snails and hermits will simpley ignore it.