I asked a similar question a couple months ago and didn't get a clear answer. Based on my experimenting, the answer is "yes, but don't". Failure to connect to a local host server can be caused by a number of things. First, the Godot server must use a different port than that used by the web server (usually port 80). Second, the HTML exported "server app" cannot run unless the web page hosting it is loaded. Try loading the server page in one browser, then load the client page in a second browser. Based on my experiments, the HTML export is not a viable option for Godot server apps.
If you are planning to making your game publicly available, you need to be aware of the limitations of HTML exports of a server apps. If you plan to host your server on an inexpensive shared hosting service, it won't work without a dedicated IP. Shared hosting plans often map domain names to different ports on a common host server IP. Obviously, trying to open a server listener on a port not mapped to your domain is going to fail. You will need either a VPS with static IP or a dedicated physical host with a static IP.