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 10.1.1.183:8123 and npm runs on 10.1.1.183:81
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.

default_config:

# Load frontend themes from the themes folder

frontend:

  themes: !include_dir_merge_named themes

# Text to speech

tts:

  - platform: google_translate

automation: !include automations.yaml

script: !include scripts.yaml

scene: !include scenes.yaml

http:

  use_x_forwarded_for: true

  trusted_proxies:

    - 10.1.1.183

  ip_ban_enabled: true

  login_attempts_threshold: 5