How to make the response code of the server page 404 = 404?

Good day!
CMS MODX revo 2.7.1
By means of modx to make:
a) the response code of the server page 404 = 404
b) what would you when you have incorrectly entered the url in the display site.ru/404? Ie so it works when not entered correctly the url redirects to the page but displays everything that was entered incorrectly.
In htaccess ordered an ErrorDocument 404 https:/site.ru/404 didn't help.
March 23rd 20 at 18:56
2 answers
March 23rd 20 at 18:58
You need to create a 404 page in the document tree
in the settings of the cms the 404 error Page to specify the id of the created page
all.
I the principle of creating a 404 page you know how to do (in the tree created a 404, then id specified in setup), and everything works, but when testing pays 200 instead of 404.

HTTP/1.1 200 OK
Server: nginx reuseport/1.13.4
Date: Tue, 04 Jun 2019 06:21:16 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Keep-Alive: timeout=30
Vary: Accept-Encoding
X-Powered-By: MODX Revolution
Set-Cookie: PHPSESSID=29a7eaeee9953a15596f6b86112384a8; expires=Tue, 11-Jun-2019 06:21:16 GMT; Max-Age=604800; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache - merritt_Lockman commented on March 23rd 20 at 19:01
@merritt_Lockman, You must check the created page) You check a non-existing address site.ru/bla-bla - here it should give error 404) - makenna.Gaylo commented on March 23rd 20 at 19:04
March 23rd 20 at 19:00
Ie is required to use photo direct to the 404 page, the status of the server's response was also 404?
What is modx — don't know.
How to make a static error page — I don't know .htaccess did not work.
For error pages with PHP you can check the points where $_SERVER['REQUEST_URI'] or the value of $_SERVER['REDIRECT_STATUS'] (in the error handler — '404', with the direct query — seems to be undefined, but definitely not 404) and optionally specify the status of the server response 404 with the function header().

Find more questions by tags MODX