We show that the varieties of the Hochschild cohomology of a block algebra and its block cohomology are isomorphic, implying positive answers to questions of Pakianathan and Witherspoon (‘Hochschild cohomology and Linckelmann cohomology for blocks of finite groups’, J. Pure Appl. Algebra 178 (2003) 87–100; ‘Quillen stratification for Hochschild cohomology of blocks’, Trans. Amer. Math. Soc. 358 (2005) 2897–2916). We obtain as a consequence that the cohomology H*(G; k) of a finite group G with coefficients in a field k of characteristic p is a quotient of the Hochschild cohomology of the principal block of kG by a nilpotent ideal.