Mobile app version of vmapp.org
Login or Join
Frith620

: DNS redirect for domain to subdomain What I am looking to do is to redirect all traffic from www.domain.com to www1.domain.com(subdomain of domain.com) via DNS. I am attempting to move from a

@Frith620

Posted in: #Cname #Dns #Domains #Godaddy #Subdomain

What I am looking to do is to redirect all traffic from domain.com to www1.domain.com(subdomain of domain.com) via DNS.

I am attempting to move from a local server (domain.com) to a GoDaddy server (www1.domain.com) which is a VPS, with the intention of completely shutting down the local server after the move. I have successfully moved the site's contents to the subdomain (www1.domain.com) and would like to direct all traffic to domain.com now to www1.domain.com.

The DNS is controlled here locally, not by Godaddy.

I previously tried setting a CNAME record like so: www IN CNAME www1.domain.com.

But that failed terribly. Can anyone please provide some insight as to what other solutions there may be?

Would something like this work instead? The IP address 1.2.3.4 would be the IP address of the Godaddy server.
@ IN A 1.2.3.4
www IN CNAME www1.domain.com

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Frith620

2 Comments

Sorted by latest first Latest Oldest Best

 

@Alves908

You cannot redirect via DNS. That is not what DNS does.

You would have to define domain.com on your new server and potentially point the site directory to www1.domain.com to make what you are doing work.

BUT STOP! Don't do it!

In order for a web server to handle requests, the site must exist on the server. You cannot just point stuff here or there.

I would tell you NOT to use www1 and simply create your site as www or rename it on the new server then update the DNS when ready. This is how it is normally done.

10% popularity Vote Up Vote Down


 

@Smith883

If must control DNS yourself, set up an A record for the subdomain pointing to the IP address of the godaddy server that is all you need assuming you have set up that subdomain at godaddy.

But more to the point, why even bother doing that? Move the content, change the nameservers for domain.com (or the IP address if you are using your own child nameserver) and then you don't have to do any redirecting.

Aside: I would be wary of using godaddy, but that is just from my personal experience.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme