No Client-Side Redirects
Checks that redirects happen server-side, not via JavaScript.
What this check measures
We fetch each URL and check for `window.location = ...` or `location.replace(...)` patterns in the initial response. Client-side redirects work for users but cost SEO.
Why it matters
JavaScript redirects pass some ranking equity but slower than HTTP 301. AI crawlers without JS cannot follow them at all — page becomes orphaned for AI search.
How our audit detects it
Parse JS for meta refresh or window.location assignments in initial page load. Flag if redirect should be server-side.
Typical findings
- error_outlineuseEffect(() => window.location = "/new-url").
- error_outline<meta http-equiv="refresh" content="0; URL=/new">
- error_outlineAuth guard redirects via router.push instead of middleware.
How to fix
Replace client redirects with server-side 301/302. In Next.js use `redirect()` from next/navigation or middleware. Meta refresh = anti-pattern.
Frequently asked questions
When are JS redirects OK?expand_more
Want this checked on your site?
Pantra runs the full audit (SEO, Security, GEO, Performance, Schema, Technical, Images) in 10 seconds and generates stack-specific fix prompts.
Scan my siteRelated checks
SSR / Pre-rendering
Checks if the page is server-rendered or statically pre-rendered.
TechnicalHTTP Status Codes
Checks that pages return proper status codes — 200 for live, 404 for missing, 301 for moved.
TechnicalViewport Meta Tag
Checks for <meta name="viewport" content="width=device-width, initial-scale=1">.
TechnicalHTML lang Attribute
Checks that <html> has a lang attribute matching the page language.