Context. Observations of small carbon-bearing molecules such as CCH, C 4 H, c-C 3 H 2 , and HCO in the Horsehead nebula have shown these species to have higher abundances towards the edge of the source than towards the center. Aims. Given the determination of a wide range of values for ζ (s −1 ), the total ionization rate of hydrogen atoms, and the proposal of a column-dependent ζ(N H ), where N H is the total column of hydrogen nuclei, we desire to determine if the effects of ζ(N H ) in a single object with spatial variation can be observable. We chose the Horsehead nebula because of its geometry and high density. Methods. We model the Horsehead nebula as a near edge-on photon dominated region (PDR), using several choices for ζ, both constant and as a function of column. The column-dependent ζ functions are determined by a Monte Carlo model of cosmic ray penetration, using a steep power-law spectrum and accounting for ionization and magnetic field effects. We consider a case with low-metal elemental abundances as well as a sulfur-rich case.Results. We show that use of a column-dependent ζ(N H ) of 5 × 10 −15 s −1 at the surface and 7.5 × 10 −16 s −1 at A V = 10 on balance improves agreement between measured and theoretical molecular abundances, compared with constant values of ζ.