Photoreflectance has been applied to study the exciton energies and linewidths for hetero-and homoepitaxial GaN layers ͑i.e., GaN layers grown on sapphire and truly bulk GaN crystal obtained by ammonothermal method͒. In order to modulate the built-in electric field inside the samples and eliminate photoluminescence signal from photoreflectance spectra, the surface band bending was modulated by the laser light with the photon energy smaller than the energy gap of GaN, i.e., a 532 nm laser line. The Varshni-type and Bose-Einstein-type parameters that describe the temperature dependence of the exciton transition energies have been evaluated and compared for the two GaN epilayers. It has been concluded that the residual strain in the heteroepitaxial layer influences the exciton transition energy but does not influence the Varshni and Bose-Einstein parameters. It has been found that this strain significantly influences the exciton linewidth. The broadening parameter, which is associated with the temperature-independent mechanisms ͑⌫ 0 parameter corresponding to the exciton linewidth at 0 K͒, has been found to be ϳ1 meV for the homoepitaxial layer. For the heteroepitaxial layer this parameter is twice higher ͑this work͒ or few times higher ͑previous papers͒.