A smart spectrophotometric method for the analytical determination of iron concentration in whichever oxidation state was developed using a novel optical sensor. The optical sensor was prepared by direct immobilization of novel synthesized chromophore, 5‐(((1,10‐phenanthrolin‐5‐yl)imino)methyl)‐2‐hydroxybenzoic acid (Phimhb) onto mesoporous silica nanospheres (MSNSs). The novel Phimhb chromophore has two sites, one is selective to Fe(II) ions and the other is selective to Fe(III) ions. The ions′ color can be seen with the human eye and monitored using spectrophotometric techniques or a smartphone. The influence of several parameters on the evaluation of iron ions content was studied and optimized. The proposed method was validated in terms of LOD, LOQ, linearity, and precision according to ICH guidelines. The optical Phimhb sensor has wide linear dynamic ranges with low detection limits of 4.94 ppb (1.83×10−7 mol L−1) and 10.4 ppb (3.85×10−7 mol L−1) for Fe(II) and Fe(III), respectively. The response time of this sensor for both ions was 60 s. The Phimhb sensor could be reproduced multiple times and used with a higher capacity each time. The effect of potential interfering ions on the estimation of Fe(II) and Fe(III) was investigated. The outcomes clarified that the prepared Phimhb sensor was very selective to Fe(II) and Fe(III) ions. Therefore, the Phimhb sensor had been successfully used in the determination of Fe(II) and Fe(III) in real water even without any pre‐concentration, it has high specificity.