Special domain for a page

There is a plugin that does exactly this:

https://wordpress.org/plugins/multiple-domain-mapping-on-single-site

Anyway, it would be nicer to have things under control with an understandable few lines of script, so I’m still open to answers