I am using Forge Laravel Server there I am using Let’s encrypt for SSL.
I have some domain/sub-domain which will point to my server. In this case, I am getting
“This server could not prove that it is www.example.com; its security certificate is from example.com. This may be caused by a misconfiguration or an attacker intercepting your connection.”
So, i research and found which need SSL for all domain/sub-domain in the laravel forge on Let’s Encrypt. Currenlty i am manually adding a domain for SSL certificate,
You have to prove that you control domain names in order to issue certificates for them. There's no concept of "any name that points to this server". The reason for this is that otherwise, an attacker who operates a network could serve fake DNS replies for sites, pretending that they were pointed to the attacker's site. Then users of that network would be redirected to the attacker's site and their browsers wouldn't warn them.
However, there are web servers that will automatically try to issue a certificate for arbitrary domains pointed at them; Let’s Encrypt’s validation will succeed or fail depending on, well, if it’s a valid hostname legitimately pointed at your server.