Many websites and web apps these days have hostname filtering at the webserver level. Even if the IP address from the client is correct, it will not permit a connection that way. The req needs to come with one of the valid hostnames in the header, inc the correct protocol. At least, that's what I do with mine. The req must come with https://whatever/ or https://www.whatever/ or the req gets ignored completely.
If an intermediary such as CloudFlare is used, there's likely to be another layer of req filtering at the CloudFlare level.