Fixing the api to render a url and use hosts