4

I have changed the DNS for my domain. what code (or header) should I use in my old server to tell the visitor's browser or ISP that it should check for my new DNS and the current content is old?

is the temp redirecting to a subdomain should help?

or you know a better way?

2
  • You could select one answer as the best answer. Commented May 21, 2014 at 20:29
  • @RaffaelLuthiger none of them is the answer yet. I'm learning more about the DNS stuff, I'm going to edit the question to make it clear and probably come with my answer eventually.
    – Alexar
    Commented May 22, 2014 at 23:09

5 Answers 5

5

It looks like you can not do much at the moment. You could put up a message on the old server stating that the visitor is on the old website. If you would have more control over your website then you could configure a "proxy" to the new server. But for this you need your own server and some understanding about web server software.

But something for the next time: What you should have done first was to set the time-to-live (TTL) for the DNS records down to 10 minutes or so. Usually you would do this about one week in advance of the move. And you do this on the old DNS servers. Then when the change happens it takes ideally only 10 minutes till all users visit the new website.

I say ideally because not every ISP has configured their DNS servers to respect the TTL value. Some set their own value.

If you can not change the TTL and you can not configure a proxy then you probably have a pretty cheap hosting package. So if it is really important to you that you can switch easier in general then I recommend you to plan in more money for the hosting. If your website isn't worth a lot then you have to live with the fact that switching the provider brings some problems along.

1

TTL is your friend. Before migrating ask the registrar to change the TTL for the nameservers, if possible to 600 seconds or the minimum available.

When I migrate websites using Cpanel for instance, apart of changing nameservers at the registrar to point to nameservers for server B, I normally change the IP address in old nameservers to point to the new server B. That way, if someone is still reaching old nameservers it will reach the new IP address.

0

Did your ip address change and the domain name is still the same? In this case, the old dns server should return the new ip address for you domain name. If your domain name changed, you could configure your webserver, to redirect all requests from the old domain to the new domain .

4
  • 1
    It takes time for DNS changes to propagate -- some servers will have the older IP address cached, and may even ignore the TTL setting before trying to refresh their data from the authoritative DNS server. So it may be necessary to keep the old IP address in service for a while, until the stale DNS entries eventually disappear.
    – Jim Lewis
    Commented Apr 11, 2010 at 18:31
  • domain is the same. the problem is that i cannot change DNS server settings. I just can change DNS for domain.
    – Alexar
    Commented Apr 12, 2010 at 9:31
  • Frankly, takpar, your comment is hard to understand. You say you cannot change the DNS but you say you changed it? Can you be more specific and provide hard details?
    – bortzmeyer
    Commented Apr 13, 2010 at 8:51
  • @bortzmeyer, I can change DNS server for domain from NS1 to NS2. But I cannot modify settings in either NS1 or NS2. that's waht I mean. If I could modify NS1 settings there were no problem.
    – Alexar
    Commented May 14, 2011 at 5:26
0

Frankly, the question makes no sense.

Did you move your website from one hosting to provider to another? Then you need to log into your domain registrar and point the name server entries to the name servers provided by your new hosting provider.

Did you change the server name on the same server and keep the domain name the same? Then you need to go your cPanel (or whatever else is being used) and update your DNS entries and then wait for your hosting provider to pick up the changed information and pull it into their name servers.

what code (or header) should I use in my old server to tell the visitor's browser or ISP that it should check for my new DNS

This specifically is not allowed as a security measure, unless you actually are asking about a 301 redirect from the old server to the new server which is a HTTP server function, not DNS.

3
  • The address is the same, MySite.com has been in ServerA and is now in ServerB, so 301 has no meaning, I just looking for a way to force clients coming to ServerA to clear their DNS cache, so they will be updated. I don't call this a security matter.
    – Alexar
    Commented Oct 21, 2011 at 22:00
  • Sooo... To put this hypothetically so I understand. Take an ip like 127.0.0.20. Host www.example.com on ServerA. Change www.example.com over to run on ServerB with the ip assigned as 127.0.0.20. Correct? I take it from "address", you mean the actual IP address. Commented Oct 23, 2011 at 5:06
  • I can't just "take it" from ServerA, assume both ServerA and ServerB are a cPanel account and I do not want just to remove my account on ServerA, I just had changed DNS from NS.ServerA to NS.ServerB. so this is not a solution.
    – Alexar
    Commented Oct 23, 2011 at 17:59
0

There is no code or header to tell visitors of your new DNS records. You just have to wait for the new records to propagate over the web. It used to take up to 72 hours but now should be complete within minutes. Having good control over your DNS TTL is always a plus

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.