How would I redirect subdomains to my main domain in NGINX?

August 2, 2017 986 views
Nginx Ubuntu 16.04

After setting up my Ubuntu 16.04 droplet by following the documentation supplied by Digital Ocean, I noticed that my droplet will serve up content intended for my domain under any miscellaneous subdomain that is typed into the address bar.

Ideally, I would like to redirect these non-existent * addresses to and still have subdomains that I have created serve up their intended content.

Thank you ahead of time to anyone that can assist me with my question; I have not done any configuration to the default NGINX server block file beyond the initial droplet set up using the Ubuntu 16.04 set up guide on Digital Ocean.

Be the first one to answer this question.