This question already has an answer here:
- Is CN/Hostname verification against SSL certificate required for non browser software using openssl & why? 3 answers
- Is it neccessary that website certificate must have site URL? 4 answers
- SSL Certificate framework 101: How does the browser actually verify the validity of a given server certificate? 3 answers
As I understand them, SSL certificates contain a domain name, a public key and the giving CA.
Why is it important to include a domain name?
Why isn't it enough that the CA considers the public key as trusted and that the said server indeed has the private key associated with it?