RewriteEngine on
RewriteCond %{HTTP_HOST} !^yourdomain.tld$
RewriteCond %{HTTP_HOST} !^www.yourdomain.tld$
RewriteCond %{HTTP_HOST} !^domainalias.tld$
RewriteRule ^ http://yourdomain.tld/parked.html [L,R=302]
IncludeOptional sites-available/yourdomain.tld.vhost
#init.d based init system
/etc/init.d/apache2 reload
#systemd as init system
systemctl reload apache2
#Debian based systems
editor /etc/apache2/apache.conf
IncludeOptional sites-available/ncomputers.org.vhost
IncludeOptional sites-enabled/*.vhost
#Red Hat and SUSE based systems
editor /etc/httpd/conf/httpd.conf
IncludeOptional sites-available/ncomputers.org.vhost
IncludeOptional sites-enabled/*.vhost
printf 'GET / HTTP/1.1\r\nHost:yourdomain.tld\r\n\r\n' | netcat yourdomain.tld 80
printf 'GET / HTTP/1.1\r\nHost:localhost\r\n\r\n' | netcat yourdomain.tld 80