Can't get InfluxDB to connect over URL, does work with IP and port

I’d like to set HA to access InfluxDB at http://influxdb.lan/. This URL works, it brings me to the InfluxDB GUI. However, if I put this in my configuration.yaml file: host: http://influxdb.lan, I get the constant error in HA that the name can’t be resolved. I checked in the container that runs HA, I can resolve http://influxdb.lan/. If I replace host: http://influxdb.lan with host: 192.168.0.253 and port: 8086, then it all works fine.

Any idea what’s causing my URL to fail?

influxdb:
  api_version: "2"
  host: http://InfluxDB.lan
  ssl: false
  verify_ssl: false
  token: "####"
  organization: "####"
  bucket: "home_assistant"
  precision: "s"
  include:
    entity_globs: