correctly pass hostname to view