How do I set my views to return a 404 using Global: Null under contextual filters?
In Contextual filters select Add; in the dialog box that appears, select Global: Null.



Click on Add and configure contextual filters.

In the dialog box that appear next, in the fieldset When the filter value is available or a default is provided, check Specify validation criteria, select - Basic validation - for Validator, and select Show "Page not found" for Action to take if the filter value does not validate. In the fieldset More, check Fail basic validation if any argument is given.



I tested it with an "Articles" view I created, and it works.





The "Global: Null" argument must be the last one. If you need a user ID, for example, first you add it as argument, and then add the "Global: Null" argument.

I altered the "Article" view to accept a user ID as argument, which is used to filter the list of article nodes. The view still works, as it doesn't accept an extra argument.