The lone pair of electrons on the oxygen atom of the alkoxy group enters into the conjugation with the benzene ring due to its +M effect.

As a result, the ortho and para position become rich in electron density compared to the meta position. Hence, the electrophile attacks ortho and para position.