You can try adding an entry to your hosts file, and then also put your domain into the site_config file.
from this post…Wkhtmltopdf layout error - #4 by lasalesi maybe check for
- the hostname configuration of ERPNext (see site/site1.local/site_config.json should contain
"host_name": "https://www.yourdomain.com",)