404 not working, going to homepage; how to fix?
In my case, the issue was the multi-site config attribute NOBLOGREDIRECT This had been set in wp-config.php… // Redirect non-existent Multisite subdomain calls to www primary site define( ‘NOBLOGREDIRECT’, ‘http://www.example.com’ ); This prevents a valid 404 appearing since it is always interpreted as a bad call to a subdomain. There are two solutions: Comment it … Read more