tags:

views:

965

answers:

3
+1  Q: 

CNAME on GoDaddy

I have a domain on godaddy and want to point it to a specific place on another domain.

So domain1.com points to domain2.com/page2.html

Godaddy seems to make me want to just point to domain2.com, which houses another landing page. Anyone know how to do this? I don't want the user to know they are on domain2.com/page2.html, so a simple forwarding won't work.

thanks

+2  A: 

CNAME is only for pointing to another domain name. The /page2.html is an HTML construct, not a DNS construct. DNS allows your computer to look up the IP address for a domain name. A CNAME just returns the IP address for another record, it doesn't return a rewritten URL.

So, you can't do what you want to do with DNS. You need to set up something on domain1.com to load domain2.com.

Rob Prouse
A: 

Is there a way in HTML to domain2 to know where the view is coming from? Like if it is someone typing in domain1 that index.html redirects them to page1 but if they type in domain2 that index.html redirects them to page2.html?

A: 

That depends on what server you are running and if you have access to the server configuration. For example, in apache, you could probably create a rewrite rule based on the referrer.

Another option is if you are using some sort of programming language like PHP on domain2. Then index.php could look at the referrer and redirect to page2.

Rob Prouse