Chlorine is ortho directing in electrophilic aromatic substitution instead of its electron withdrawing nature because inductive effect of chlorine destabilises the intermediate carbocation which is formed during the electrophilic substitution. But because of more strong resonance effect, the halogen stabilies the carbocation at ortho- and para-position. 