I have first domain name registered with some domain name registrar, for which I don't have web hosting account, only dns hosting.
I have second domain name registered with godaddy, with web hosting account.
I want to redirect the first domain name to the second one so that when the user types the first domain name, what is displayed is the contents of the second domain name, but URL displays first domain name. So for example if I type "firstdomain.com/smth/index.html" it will show me contents of "seconddomain.com/smth/index.html", but URL bar will show "firstdomain.com/smth/index.html".
I tried to do this by setting CNAME on the first domain like this "firstdomain.com -> seconddomain.com", but it seems that it is impossible to set a CNAME record that starts with the first domain name, and points to the second. You can only set up CNAME records that start with subdomains of the first domain. So I can make "www.firstname.com -> seconddomain.com" but not "firstdomain.com -> seconddomain.com". How can I solve this problem?
And after I set up the CNAME for the first domain, what do I need to change in my godaddy account so that everything works as intended? Do I need to change something in the dns records for the second domain as well?