passing proper hostname to backend