DNS & Secondary Domain Question

|tera|

Master of Messengers
Joined
Mar 31, 2006
Messages
25,903
Reaction score
2,952
Location
terra
Hi folks,

I have a scenario.

Old website is on domain.com.
New website is on subdomain.domain.com.

Both domains are on different servers and different hosting companies. Transferring domains is not an option.

I would like to have domain.com point to subdomain.domain.com, but function perfectly normal as if it was located as if it were on domain.com.

I know we should point DNS entries to my server at subdomain.domain.com, but my concern is that visitors at subdomain.domain.com will see that the url and or links on the website do not point to domain.com.

Will this be the fact or not?

I just need clarification on this. Do I actually need to create an addon domain for domain.com, even if it's not being transferred to subdomain.domain.com and will it work properly, i.e., will the site perform as if it seems it is running from domain.com? Or do we only need to point DNS to subdomain.domain.com and the links and old domain will point to the new domain and work flawlessly as it should, seemingly looking as if it is hosted on the new server and new website?

Thank you for any assistance.

Regards,
 
I don't see an issue if all the links on the sites are relative and not direct links. Why don't you put this up on a test environment first and test?
 
I don't see an issue if all the links on the sites are relative and not direct links. Why don't you put this up on a test environment first and test?

I don't have a test environment, it's a personal project, nothing commercial. I don't have the resources.

I'm not that clued up with the back end of DNS and domains etc. My second question is. How would the domain.com point to subdomain.domain.com on the new server and not to my own website on new the new server? I have a few sites/domains on the new server, so how would I force the old server to specifically point to the subdomain on the new server?

Thanks.
 
Do you have access to the dns admin? All you need to do is create a new A record and point it to the new IP.
 
Do you have access to the dns admin? All you need to do is create a new A record and point it to the new IP.

I don't mean to be daft, but how would be point to the correct site? Won't it just point to the server? Since the IP address is the same for the domain and the subdomain where I created the site?
 
I don't mean to be daft, but how would be point to the correct site? Won't it just point to the server? Since the IP address is the same for the domain and the subdomain where I created the site?

I would need to know more about the setup. Is the server Linux or Windows?
 
You generally can't set up a subdomain without some kind of DNS permissions on the primary domain. So that's your best bet. Then you just set up your vhost on the new server. Your other option would be a redirect on the homepage / site config file, but then your uri will change. Messy.

Edit: this makes no sense to me. Why are you trying to redirect to a subdomain on the same host?
 
Last edited:
I would need to know more about the setup. Is the server Linux or Windows?
It's Linux, Cpanel hosting.
You generally can't set up a subdomain without some kind of DNS permissions on the primary domain. So that's your best bet. Then you just set up your vhost on the new server. Your other option would be a redirect on the homepage / site config file, but then your uri will change. Messy.

Edit: this makes no sense to me. Why are you trying to redirect to a subdomain on the same host?

I'm not redirecting on the same host. I have my own website running on the new server and created a new website on the subdomain of my own website. Now I want to point another domain to the new website I created on the new server, which has to point to the subdomain. Understand?
 
It's Linux, Cpanel hosting.


I'm not redirecting on the same host. I have my own website running on the new server and created a new website on the subdomain of my own website. Now I want to point another domain to the new website I created on the new server, which has to point to the subdomain. Understand?

Just go to sub-domains in Cpanel and point the subdomain you created the A record for to the correct folder. Maybe I'm not fully understanding what you want to do but that should be all you need to do.

I don't work with cpanel very much and so maybe I'm wrong, if you want to do it via ssh I can help you though. :D
 
Geeeeeeeeeeeeee........

How can I explain this.

www.terasucksatexplainingstuff.com is the old site.

www.teraistryingtoexplainstuff.com is my own site

I created a new site at newsite.teraistryingtoexplainstuff.com

Now I want to point www.terasucksatexplainingstuff.com to newsite.teraistryingtoexplainstuff.com, but I want www.terasucksatexplainingstuff.com to look and act exactly the same as it usually did, without seeming like it is running off newsite.teraistryingtoexplainstuff.com.

How do I achieve this?

When I point DNS records to newsite.teraistryingtoexplainstuff.com, will it go straight away to newsite.teraistryingtoexplainstuff.com or will it go to www.teraistryingtoexplainstuff.com, how do I know where it will point to? It's two completely different websites.
 
... but I want www.terasucksatexplainingstuff.com to look and act exactly the same as it usually did, without seeming like it is running off newsite.teraistryingtoexplainstuff.com. ...

On www.terasucksatexplainingstuff.com you will have a short html page with a redirect to newsite.teraistryingtoexplainstuff.com
then on .teraistryingtoexplainstuff.com you will use vhost (virtual hosting feature) of Apache for example to display the newsite.

Virtual hosting enable you to have completely different websites on one domain. For example, lets say you have:
newsite.teraistryingtoexplainstuff.com
www.teraistryingtoexplainstuff.com
stuff.teraistryingtoexplainstuff.com
Each of these can have their own complete sites (on the same server) if you use virtual hosting.
 
Top
Sign up to the MyBroadband newsletter
X