The process $e^+e^-to K^+K^-pi^0$ is studied with the SND detector at the VEPP-2000 $e^+e^-$ collider. Basing on data with an integrated luminosity of 26.4~pb$^{-1}$ we measure the $e^+e^-to K^+K^-pi^0$ cross section in the center-of-mass energy range from 1.28 up to 2 GeV. The measured mass spectrum of the $Kpi$ system indicates that the dominant mechanism of this reaction is the transition through the $K^{ast}(892)K$ intermediate state. The cross section for the $phipi^0$ intermediate state is measured separately. The SND results are consistent with previous measurements in the BABAR experiment and have comparable accuracy. We study the effect of the interference between the $phipi^0$ and $K^ast K$ amplitudes. It is found that the interference gives sizable contribution to the measured $e^+e^- to phi pi^0to K^+K^-pi^0$ cross section below 1.7 GeV.