Conventional sidewall gratings in GaN-based distributed feedback (DFB) laser diode have a thick p-type layer, which may cause current spreading and carrier-induced anti-guiding effect, severely deteriorating the laser performance. In this study, we reported a novel fabrication technology to not only reduce the remaining p-type layer in the sidewall gratings, but also realize close-coupled sidewall gratings. Based on this, we further investigated the influence of sidewall grating etching depth on GaN-based DFB laser diodes. The results showed almost unchanged current injection efficiency, nearly coincided I-V curve and near-field emission width for shallow etched structure, which indicated that the current spreading was neglectable in GaN-based ridge structure laser diodes. Based on this analysis, GaN-on-Si DFB LDs with an emission wavelength of 414 nm, FWHM of 22pm, and SMSR of 19.1 dB were realized.