Static build, no redirect-aware adapter
- What Astro generates or serves
- HTML with a meta refresh; no HTTP redirect status from the server
- Check
- Request the old URL and inspect the actual status and
Locationheader; expect a 200 with HTML
Configure Astro redirects for static and SSR sites, preserve route parameters, and verify that your host returns the intended HTTP status.
Add redirect mappings in astro.config.mjs for known route moves, then confirm how your deployment serves them. A static Astro build without a redirect-capable adapter outputs a meta refresh HTML page, which does not return an HTTP 301. SSR or a compatible static adapter can issue real redirect status codes. Remove route collisions and test the deployed response, destination, and query behavior.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
Location header; expect a 200 with HTMLAstro's routing guide says astro build outputs HTML files with a meta refresh tag by default, and that supported adapters write the host's redirect configuration instead. With SSR or a static adapter, the config reference says Astro serves redirected GET requests with a 301 and uses 308 for any other request method; set a status object to change that. Google lists a 0-second meta refresh as a permanent redirect type, but ranks server-side redirects as the most likely to be interpreted correctly, so prefer a real HTTP redirect for moves that matter.
/blog/[...slug] to /articles/[...slug]. Astro's config reference says you can redirect static and dynamic routes only to the same kind of route. Redirects to external http or https URLs need Astro v5.2.0 or later./product1/ and /product1 as not supported. Let the host normalize slash behavior consistently.import { defineConfig } from 'astro/config'
export default defineConfig({
redirects: {
'/old-guide': '/new-guide',
'/news': {
status: 302,
destination: 'https://example.com/news'
}
}
})Google recommends a permanent server-side redirect whenever possible to change the URL shown in search results. See the 301 redirect guide, Astro routing and redirects, and the redirect chains diagnostic.
Search the build output for the old route. Confirm whether it contains meta refresh HTML or whether an adapter wrote host-level redirect rules.
Check status, Location, destination status, and whether the final page is the intended equivalent. Use GET as well as HEAD if your host handles those methods differently.
Check trailing slash behavior, encoded paths, and campaign parameters. Make sure each old URL reaches one final canonical destination without a chain or loop.
Change navigation, canonical tags, and links to point directly at the destination. Keep the redirect for external backlinks and bookmarks.
3 questions people ask next, answered from the sources on this page.
Not without an adapter that handles redirects. Astro's static build outputs an HTML page with a meta refresh tag, and the status code is not used by the server. Use SSR, a supported static adapter, or host-level redirect support when you need a real HTTP status.
A file-based route at the same path takes precedence over a configured redirect, as the routing guide says. Remove or rename the conflicting route, rebuild, and test the deployed response.
Configured dynamic redirects require matching route parameter patterns on both sides. Use an explicit rule or host-level logic for a different route shape.
Run the free audit, then approve the fixes. Every change can be undone.