Thread:Project:Support desk/Custom 404 page on nonexistent article/reply

Try modifying MediaWiki:Noarticletext-nopermission on your wiki.