locked
Page not found redirect type 301 permanently caching in Chrome. RRS feed

  • Question

  • User-446412859 posted

    Hello,

    I am an IIS novice and need help solving a problem. Our company has an internal portal to our ERP system. This is an internal site and our users need to be connected to our corporate LAN either directly or using a VPN. With Covid restrictions, we now have hundreds of users working from home and we have occasional mistakes of users trying to access the portal when not connected to our internal network (VPN not connected). The site redirects to our company's external home page as a 301 redirect. Chrome sees this as a permanent move and permanently caches the redirect so when the users connect to the VPN and try to open the portal, they are still redirected and the users have to clear browsing data in order to access the portal. I cannot find the redirect in IIS and our infrastructure department says it automatically redirects in DNS and they can't or won't change it. Is there something I can do in IIS to fix this so it is not permanently cached? Maybe a 302 redirect? Thank you in advance.

    Tuesday, June 2, 2020 6:25 PM

All replies

  • User690216013 posted

    The site redirects to our company's external home page as a 301 redirect.

    Everything bad seems to come from this 301 redirection, but when your users are not connected via VPN, their requests won't land on IIS so it is impossible to fix from there.

    our infrastructure department says it automatically redirects in DNS and they can't or won't change it.

    What they said is partially right and wrong.

    So I assume the two sites http://workportal.com and http://externalhomepage.com are linked by DNS records. In the public network (internet), your network administrators set up a rule to redirect from http://workportal.com to http://externalhomepage.com . That makes perfect sense, as the former is not supposed to be publicly accessible. When the users connect via VPN, the DNS queries go through your internal DNS service, and http://workportal.com goes to the IIS machine(s).

    The problem here is your network administrators shouldn't configure a 301 redirection. They can change that to 302 as you might guess, but why they said "they can't or won't change it" is really what you have to dig further.

    Most DNS service providers support 302 redirection at DNS level. One example is Google Domains (see "Redirect type" section)

    https://support.google.com/domains/answer/4522141?hl=en

    Other major providers have similar pages to educate their users.

    Tuesday, June 2, 2020 7:50 PM
  • User-460007017 posted

    Hi Mort3992,

    Now that the web browser receive 301 redirection, IIS no longer control the redirection any more. You need to clean browser cache on client side. Change 301 to 302 make no difference because your browser won't event send a request to IIS.

    Best Regards,

    Jokies Ding

    Wednesday, June 3, 2020 8:16 AM
  • User-2064283741 posted
    One of the rules I use in 20+ years of Web administration is never use 301s always use 302s.
    Fixing problems with 301s is hard sometimes impossible. permanent 301s can stay around a long time.
    Wednesday, June 3, 2020 8:47 AM