In Rayleigh–Bénard convection experiments, the thermal coupling between the sidewall and fluid is unavoidable. As a result, the thermal properties of the sidewall can influence the flow structure that develops. To get a better understanding of the influence of the sidewall, we performed a one-to-one comparison between experiments and direct numerical simulations (DNS) in aspect ratio (diameter over height) $\unicode[STIX]{x1D6E4}=1.00$ samples. We focus on the global heat transport, i.e. the Nusselt number $Nu$, and the local vertical temperature gradients near the horizontal mid-plane on the cylinder axis and close to the sidewall. The data cover the range $10^{5}\lesssim Ra\lesssim 10^{10}$ where $Ra$ is the Rayleigh number. The $Nu$ number obtained from experimental measurements and DNS, in which we use an adiabatic sidewall, agree well. The experiments are performed with several gases, which have widely varying thermal conductivities, but all have a Prandtl number $Pr\approx 0.7$. For $Ra\gtrsim 10^{7}$, both experiments and DNS reveal a stabilizing (positive) temperature gradient at the cylinder axis. This phenomenon was known for high $Pr$, but had not been observed for small $Pr\approx 0.7$ before. The experiments reveal that the temperature gradient decreases with decreasing $Ra$ and eventually becomes destabilizing (negative). The decrease appears at a higher $Ra$ when the sidewall admittance, which measures how easily the heat transfers from the fluid to the wall, is smaller. However, the simulations with an adiabatic sidewall do not reproduce the destabilizing temperature gradient at the cylinder axis in the low $Ra$ number regime. Instead, these simulations show that the temperature gradient increases with decreasing $Ra$. We find that the simulations can reproduce the experimental findings on the temperature gradient at the cylinder axis qualitatively when we consider the physical properties of the sidewall and the thermal shields. However, the temperature gradients obtained from experiments and simulations do not agree quantitatively. The reason is that it is incredibly complicated to reproduce all experimental details accurately due to which it is impossible to reproduce all experimental measurement details. The simulations show, in agreement with the models of Ahlers (Phys. Rev. E, vol. 63 (1), 2000, 015303) and Roche et al. (Eur. Phys. J. B, vol. 24 (3), 2001, pp. 405–408), that the sidewall can act as an extra heat conductor, which absorbs heat from the fluid near the bottom plate and releases it into the fluid near the top plate. The importance of this effect decreases with increasing $Ra$. A crucial finding of the simulations is that the thermal coupling between the sidewall and fluid can strongly influence the flow structure, which can result in significant changes in heat transport. Since this effect goes beyond a simple short circuit of the heat transfer through the sidewall, it is impossible to correct experimental measurements for this effect. Therefore, careful design of experimental set-ups is required to minimize the thermal interaction between the fluid and sidewall.