A redirect performed in JavaScript after load depends on rendering and can be slow or missed. Where I can, I move it to the server so it happens before anything renders. Redirect performed in JS after load. Google can follow JS redirects but only after rendering, which is slower and less certain than an HTTP redirect.
Why does javascript redirect matter for AI search?
Google can follow JS redirects but only after rendering, which is slower and less certain than an HTTP redirect.
How do you fix it?
Prefer server-side HTTP redirects for critical paths.
How do you find it on your site?
- Load the page with JavaScript disabled and see whether the redirect still happens.
- Check the page source for location changes inside scripts.
- In Search Console URL Inspection, see how Google resolves the URL.
- Replace with a server-side redirect wherever the destination is known up front.
Which ranking and citation factors does it touch?
Server-side redirects are seen immediately and pass signals cleanly. JavaScript redirects rely on rendering and are slower and less certain.
What is the impact?
Medium-high reliability risk. Direct (documented as supported-but-slower).
What is the evidence?
Google follows JS redirects but server-side is more reliable. Google Search Central, Redirects and Google Search; Google Search Central, Understand JavaScript SEO Basics
Sources
Frequently asked questions about javascript redirect
What does "JavaScript redirect" mean?
Redirect performed in JS after load.
How do you fix javaScript redirect?
Prefer server-side HTTP redirects for critical paths.