Setup a variety of fallbacks for $domain

* Use domain argument
* Use $_SERVER[HTTP_HOST]
* Use $_SERVER[SERVER_NAME]