Allow a per-app hostname configuration

Just looking for feedback if that would make sense for now. This code hasn't actually been run.