We studied how the chemical composition of water in rocks affects the movement of uranium, which is important for the safety of nuclear waste disposal sites. Using computer models, we found that water chemistry inside the host rock for the waste is more decisive for the transport of uranium than groundwater chemistry in adjacent rocks. These findings help improve site selection for a disposal site by indicating which conditions are suitable and less suitable to safely isolate radioactive waste.