0

I host a website that will be moving to a different domain that is hosted on a new server. The new domain is subdomain.newdomain.com.

The site is currently hosted at currentsite.com on my servers. I will continue to host mail on my host at mail.currentsite.com.

My servers are authoritative for currentsite.com.

I want to modify the zone record in the currentsite.com.hosts file so that all website traffic (with and without www subdomain) redirects to subdomain.newdomain.com. In other words:

  • www.currentsite.com should redirect to subdomain.newdomain.com
  • currentsite.com should also redirect to subdomain.newdomain.com
  • mail.currentsite.com remains at current host

Is it possible to do this? Or do I have to rely on apache to redirect website traffic to subdomain.newdomain.com?

0

1 Answer 1

1

In your currentsite.com zone...

You can do this:

; redirect www.currentsite.com to subdomain.newdomain.com
www    IN  CNAME      subdomain.newdomain.com.

... which will take care of the first bullet point. You cannot technically redirect or forward the root domain (apex record). You can, however, resolve it to an IP address like this:

; resolve currentsite.com to subdomain.newdomain.com
; replace 123.234.1.123 with IP address of subdomain.newdomain.com
@    IN  A     123.234.1.123

This assumes your current MX records do not point to @ but instead to some other IP address(es). If they currently point to @ you'll need to modify those to point to actual IP addresses.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .