Use correct hostname for publicapi when registering route.