Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I found this answer to my question but if the DNS cache for existing.mydomain.com is the problem, wouldn't that solution just result in a infinite circular loop? Or does a DNS lookup for newsub.mydomain.com force a DNS refresh for all subdomains of mydomain.com?

share|improve this question

migrated from stackoverflow.com Aug 22 '10 at 4:11

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

newsub.mydomain.com points to the new server.

existing.mydomain.com points to the new server for users who have checked recently, and the old server for those who have not.

The old server redirects to newsub.mydomain.com with a 301 "permanently moved".

There is no loop.

However, you still have to keep the old server running until the DNS TTL for existing.mydomain.com expires. If you don't, some users might hit the old IP and think your site is down.

share|improve this answer
    
Borealid: The problem is newsub.mydomain.com is being redirected back to existing.mydomain.com (see the answer JWalker posted on that thread). I cannot maintain a parallel newsub.mydomain.com website. –  user51904 Aug 21 '10 at 7:30
    
@Sid Ahuja: I don't think JWalker's solution works. If you're just getting a new IP, simply add both IPs to the server until the TTL expires. If you're actually moving to a new host, replace the old page with a redirect as I said and do all maintenance on the new server. You don't have to maintain a parallel website, just keep the old server sending redirects until your TTL expires. –  Borealid Aug 21 '10 at 16:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.