optionally redirect to canonical host in production