Some time ago I set up traefik with a self-signed certificate created with mkcert tool to be able to develop a web app on localhost.domainname.com for the domainname.com web