For any domain name to be located on the internet, it needs to have a DNS record. So yes, you need to set this up in the DNS.
How you want to go about this depends on your specific setup. If you want to share the same IP address for the subdomain as the primary domain, you need to create a
CNAME record called
companyname, pointing to
If it's going to be on its own IP address (which is most likely), you will need to create an
A record, pointing to the IP address of the server (e.g.
companyname points to
From that point, you need to set up a new website (IIS) or a virtualhost (Apache) to serve the content and the certificate. More information is required. You may also need a dedicated IP address just for this. Your milage may vary, but there's a LOT of instructions on how to do this already on ServerFault.