A Browser Still Opens the Old Page After a 301 Fix: What to Check

Find out whether an old 301 redirect comes from a browser cache, server, or CDN using developer tools, a fresh profile, and curl.

Published
Reading time
7 min read
A Browser Still Opens the Old Page After a 301 Fix: What to Check
On this page

You changed a redirect, but your browser still opens the previous destination. The browser may have retained an earlier 301 Moved Permanently response, or the old redirect may still be coming from a server, CDN, proxy, or application. Use the checks below to distinguish those cases before clearing anything.

Key Takeaways

  • A cached 301 can send a browser to an old destination even when the live server now returns a different response.
  • Compare the affected browser with a fresh browser profile and a request made outside that browser. Make sure each requests the exact same URL.
  • Use browser developer tools to inspect the navigation chain, but do not assume every browser displays cached redirects in the same way.
  • Clearing a local cache can help diagnose a local problem; it does not prove the live redirect is correct or fix an intermediary cache.

Why a browser keeps redirecting to an old URL after a fix

A redirect response has a status and usually a Location header naming the next URL. A browser that retains an earlier permanent redirect may use it for a later navigation without obtaining the latest response for the original URL.

For example, /old might previously have returned 301 with Location: /previous. After a server change, a new request might receive Location: /current. The affected browser can still appear to go from /old to /previous if it reuses the earlier redirect.

That is only one possibility. The old response could still be served by a different server instance, a CDN, or a proxy. A cached HTML page, a client-side redirect, or a service worker could also be involved. Browser and intermediary caching behavior varies, so diagnose the response rather than assuming a 301 is cached in a particular way.

Advertisement

Compare three views of the redirect

Record the exact starting URL, including its scheme, hostname, path, trailing slash, and query string. Also note whether you are signed in and whether the issue occurs on a particular network. Different variants can reach different redirect rules.

1. Try a fresh browser profile

Open the starting URL in a newly created browser profile. A private window can be a useful comparison, but its isolation and cache behavior depend on the browser; a fresh profile is a clearer starting point.

  • If the fresh profile reaches the new destination while the original profile reaches the old one, profile-specific state is a strong suspect.
  • If both reach the old destination, investigate the live response and shared infrastructure. A fresh profile does not bypass a CDN, proxy, DNS difference, or server-side rule.

A profile may also differ in cookies, authentication, extensions, or service workers. A different result does not by itself prove that a cached 301 caused it.

2. Inspect the affected browser's network activity

Open developer tools, select the Network panel, enable request-log preservation if available, and navigate to the exact starting URL. Inspect the document requests in order:

  1. Look for the request to the original URL and its status and Location header, if shown.
  2. Follow the chain until the final document. Note which hop first points to the old destination.
  3. Look for browser-specific indications that a response came from a cache. If the original request is absent, that is a clue, not conclusive proof of why it was skipped.
  4. If the browser offers a disable-cache control, try it while developer tools are open, then compare the result. Its effect on redirect caching can vary.

If there is no relevant HTTP redirect, inspect the returned document and application behavior for a JavaScript navigation, HTML refresh, or service worker. A 200 page that navigates afterward is a different problem from a server returning a 301.

3. Request the starting URL outside the browser

From a terminal, make a GET request without automatically following redirects:

curl -sS -D - -o /dev/null 'https://www.example.com/old'

Replace the URL with the exact URL you are troubleshooting. This prints response headers rather than the response body. Check the status and Location; do not use -L for this first check, because following redirects can obscure the initial response. A GET is useful here because a server can handle HEAD requests differently.

If the first hop is correct but the final page is not, request the next Location separately and repeat. Relative locations are resolved against the URL that returned them. Avoid sharing URLs containing credentials, private tokens, or personal data in tickets or external tools.

The terminal request is a comparison, not an authoritative view of every user path: it may use a different network, proxy, DNS result, cookies, or authentication state. Compare equivalent conditions where possible.

Reproduce the comparison locally

This small lab uses localhost as a test hostname. It deliberately returns a cacheable permanent redirect without specifying an explicit cache lifetime. A browser may or may not retain it, so the exercise demonstrates the comparison rather than guaranteeing a cache hit.

You need Python 3 and curl. Save the following as redirect_lab.py:

import sys
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import urlsplit

if len(sys.argv) != 2 or sys.argv[1] not in ("previous", "current"):
    raise SystemExit("Usage: python3 redirect_lab.py previous|current")

destination = "/" + sys.argv[1]


class Handler(BaseHTTPRequestHandler):
    def do_GET(self):
        path = urlsplit(self.path).path
        if path == "/old":
            self.send_response(301)
            self.send_header("Location", destination)
            self.send_header("Content-Length", "0")
            self.end_headers()
            return

        if path in ("/previous", "/current"):
            body = ("Page: " + path + "\n").encode("utf-8")
            self.send_response(200)
            self.send_header("Content-Type", "text/plain; charset=utf-8")
            self.send_header("Cache-Control", "no-store")
            self.send_header("Content-Length", str(len(body)))
            self.end_headers()
            self.wfile.write(body)
            return

        self.send_error(404)


server = HTTPServer(("127.0.0.1", 8765), Handler)
try:
    server.serve_forever()
except KeyboardInterrupt:
    pass
finally:
    server.server_close()
  1. Start the initial redirect with python3 redirect_lab.py previous. In a browser, open http://localhost:8765/old; it should lead to /previous.

  2. Stop the server with Ctrl+C, then restart it with python3 redirect_lab.py current.

  3. Request the original URL outside the browser:

    curl -4 --noproxy localhost -sS -D - -o /dev/null 'http://localhost:8765/old'
    

    The running server is designed to return a 301 with Location: /current. The command bypasses configured proxies for this local request and uses IPv4, matching the server's bind address.

  4. Compare the original browser profile with a fresh profile, using developer tools as described above. If the original profile goes to /previous while the fresh profile and curl see /current, retained profile state is a plausible explanation. If both profiles go to /current, the browser may not have retained the first redirect; that is also a valid result.

  5. Stop the server with Ctrl+C when finished. Use a fresh profile for another attempt rather than assuming previous browser state has been removed.

The example and commands were not executed in this environment, and browser-specific documentation was not consulted here. Verify the behavior in the browsers and infrastructure you support.

Advertisement

If the live response still points to the old URL

Work backward from the first incorrect hop:

  • Origin configuration: Check redirect rules in the application, web server, hosting platform, and load balancer. Confirm the change reached every relevant instance.
  • CDN or reverse proxy: Determine whether it caches redirects and whether the affected URL needs an explicit purge. Check the host, scheme, and cache key variants; purging one variant may not clear another.
  • Multiple hops: The first redirect may be correct while its destination returns another redirect to the old page. Inspect each response separately.
  • Different request conditions: Compare cookies, authentication, headers, geographic routing, DNS, and proxy settings where relevant. A terminal request and a browser navigation may not take the same path.
  • HTTPS upgrades: A browser-enforced HTTP-to-HTTPS upgrade, such as one associated with HSTS, is distinct from a server redirect to an old path. Identify the actual hop before changing configuration.

If you operate the old destination, keep it useful during the transition where practical. A redirect already retained by a client cannot necessarily be recalled immediately by changing the origin.

Common Mistakes

  • Clearing the browser first and stopping there. A successful retry does not establish that the CDN or every server instance now serves the right redirect.
  • Testing a different URL. http and https, different hostnames, trailing slashes, and query strings can follow different rules. URL fragments are not sent in HTTP requests, so they require separate browser-side consideration.
  • Inspecting only the final page. The incorrect redirect may occur earlier in a chain or be followed by another redirect.
  • Assuming all clients cache identically. A fresh profile, an existing profile, and an intermediary can retain different state.
  • Asking every visitor to change browser settings. Local clearing may help an individual diagnosis, but it is not a reliable site-wide fix.

Best Practices

Use temporary redirects while a destination is still being tested, and confirm the full chain before making a redirect permanent. When changing an established permanent redirect, verify the live response, purge relevant intermediary caches where appropriate, and test in both a fresh profile and an affected profile. Document which exact URL and network path each result represents.

Conclusion

Start by comparing the exact URL across a fresh browser profile, the affected browser's network tools, and a terminal request. That comparison helps separate retained browser state from a redirect that is still being served somewhere in the delivery chain.

What would your domain sell for?

A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.