Mobile app version of vmapp.org
Login or Join
Jessie594

: How to make so that a first domain name redirects to second one but the URL displays the first domain name? I have first domain name registered with some domain name registrar, for which I

@Jessie594

Posted in: #Dns #DnsServers #Godaddy #Redirects #WebHosting

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie594

2 Comments

Sorted by latest first Latest Oldest Best

 

@Cugini213

You don't have to set a CNAME. You could just set an A record pointing to the same IP address. In the hosting panel of your website you have then set the second domain as an alias.

10% popularity Vote Up Vote Down


 

@Ann8826881

A redirect is by definition is a "redirect" and will change the url in the address bar. What you are looking is URL rewriting.

For example Apache supports this kind of thing with mod_rewrite.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme