The vector potential for a magnetic dipole is given by the following formula:
$$ \vec{A} = \frac{1}{4\pi\epsilon_0 c^2}\frac{\vec{m}\times\hat{e}}{R^2} $$
From this expression we can deduce that for a dipole $\vec{m} = m\hat{k}$ the vector potential along the z axis would be zero, due to the vector product. Then we can deduce that the magnetic field of the dipole would be zero along the z axis.
But if we start from the magnetic field formula:
$$ \vec{B} = \frac{\mu}{4\pi}\left(\frac{3\vec{r}(\vec{m}\cdot\vec{r})}{r^5}-\frac{\vec{m}}{r^3}\right) $$
It is clear that there is a non-zero component along the z-axis. What am I doing wrong with my reasoning. Is this somewhat related to the Gauge freedom of the vector potential?