Search code examples
asp.netiishttp-redirectdnshttp-status-code-301

Removing http301 redirect from client's cache


I have a server/client architecture where the client hits the ASP.NET server's service at a certain host name, IP address, and port. Without thinking, I logged on to the server and set up permanent HTTP301 redirection through IIS from that service to another URL that the machine handles via IIS (same IP and port), mistakenly thinking it was another site that is hosted there. When the client hit the server at the old host name, it cached the permanent redirect. Now, even though I have removed the redirection, the client no longer uses the old address. How can I clear the client's cache so that it no longer stores the redirect?

I have read about how permanent HTTP301 can be, but in this case, it should be possible to reset a single client's knowledge of the incorrectly-learned host name. Any ideas?


Solution

  • The HTTP status code 301 is unambiguously defined in RFC 2616 as

    any future references to this resource SHOULD use one of the returned URIs

    which means you have to go ask all your clients to revalidate the resource. If you have a system where you can push updates to your clients, perhaps you can push an update to use the same URI again, but force a revalidation.

    Nothing you do on the server side will help - in fact, by removing the permanent redirect in IIS you have already taken all measures you should.