404 not found with custom domain and NPM running as a HA addon

Hi all

I understand this topic has probably been said a thousand times but I couldnt find a solution that worked for me

I have a custom domain that I pay for
Im wanting my homeasssistant install to not be exposed but to have an SSL cert when accessing it locally
My domain runs through cloudflare and I have NPM running as a HA addon
I have gotten an ssl cert through NPM and setup a proxy host to go to ha.domain.com
home assistant runs on and npm runs on
I have put in a wildcard CNAME record in cloudflare
I cannot figure it out so any help would be amazing

My configuration.yaml looks like so

# Loads default set of integrations. Do not remove.


# Load frontend themes from the themes folder


  themes: !include_dir_merge_named themes

# Text to speech


  - platform: google_translate

automation: !include automations.yaml

script: !include scripts.yaml

scene: !include scenes.yaml


  use_x_forwarded_for: true



  ip_ban_enabled: true

  login_attempts_threshold: 5