Properly determines the host to use for the iframes