In short
A stable URL points to the same resource over time: a product page, a specific variant, a filtered list, a booking step. Search engines, generative answers and AI agents keep these addresses: they cite them, remember them within a conversation, reopen them later or pass them on to the user. Once this check is done, every page and every useful state of the site has a readable address that does not change from one session or deployment to the next, and every removed or modified address redirects with a 301 to its equivalent.
Why it matters
A cited URL lives on for a long time outside your site. An answer from ChatGPT, Perplexity or a Google AI Overview links to a specific address; an agent asked to “find the shoe I looked at yesterday” reopens the one it kept in memory; a user pastes a link received by email into an assistant. If that address returns a 404 error or lands on the home page, the citation is lost and the agent has to start over, often at a competitor's.
Agents also need addresses for intermediate states. A filter applied only in JavaScript, a variant chosen without a URL change or a booking flow with a single address cannot be reopened or shared: the agent has to repeat every click. Google, for its part, points out that it does not treat the fragment (#…) as a separate page and recommends the History API rather than fragments to load different content.
The principle is not new: the W3C has summed it up since 1998 as “Cool URIs don't change”. What has changed is the number of systems that reuse your URLs without going through your home page.
What it improves
- Lasting AI citations Links already present in answers and conversation histories keep working.
- An agent resuming a journey One address per variant, per filter and per step lets it go straight back to the desired state. A plausible effect, not publicly measured.
- SEO The signals a URL has accumulated (links, history) are passed on by a 301 redirect; without a redirect, they are lost.
- Sharing and bookmarks A copied link leads to what the user was seeing.
- Measurement Stable addresses keep statistical series comparable over time.
How to check
1. Do cited and linked URLs work? Gather the URLs that receive referral traffic from AI assistants (see identify pages cited by AI systems (opens in a new tab)), the pages that receive links, and the page export from the Search Console Pages report. Test them in bulk:
while read -r url; do
printf '%s %s\n' "$(curl -s -o /dev/null -w '%{http_code} %{redirect_url}' "$url")" "$url"
done < urls-citees.txt
Compliant result: 200, or 301/308 to the exact equivalent. A 404, a long-standing 302 or a redirect to the home page needs fixing.
2. Do useful states have an address? On a product page, choose another color: the URL must change (?variant=… or /couleur-bleu). On a list, apply a filter and a sort order, copy the address and open it in a private window: you must get the same list. On a booking engine, the address must at least carry the dates and the number of guests.
3. Are addresses independent of the session? Look in a crawl (Screaming Frog or equivalent) for the parameters sid, sessionid, PHPSESSID, jsessionid, or tokens that change on every visit.
4. Do URLs survive deployments? Compare two crawls, before and after a release: no page URL should appear or disappear without an editorial decision.
How to implement
Before you start
Design rules:
| Resource | Recommended stable address | Avoid |
|---|---|---|
| Editorial page | /guides/choisir-chaussures-trail |
a changing date or technical identifier |
| Product | /chaussures/trail-alpine |
a promotional category in the path (/soldes/...) |
| Variant | /chaussures/trail-alpine?variant=42 or ?couleur=bleu&taille=42 |
a variant chosen without a URL change |
| Filtered list | /chaussures?marque=alpine&tri=prix |
a filter in JavaScript only or in a # fragment |
| Availability search | /reserver?arrivee=2027-03-12&depart=2027-03-14&adultes=2 |
state kept only in the session |
| Cart | a fixed /panier URL, content stored server-side |
a session identifier in the address |
Maintenance rules:
- Only change a URL if there is a real gain: renaming a product does not always justify changing its address. See create short, stable and descriptive URLs (opens in a new tab).
- Sold-out or seasonal product: keep the page and its URL, with the availability status. A permanently withdrawn product redirects to its replacement or to its category.
- Every change is redirected with a 301 or 308, one old URL to one new URL, with no chain. See use 301/308 for permanent moves (opens in a new tab).
- Keep redirects for at least a year, ideally indefinitely for pages that are cited or linked.
- Links sent by email and booking deep links must not expire on public pages. Reserve time-limited tokens for private pages.
- Keep a redirect log (old URL, new URL, date, reason) versioned with the code.
Apache
Versions Apache 2.4.
For a list of moved URLs, one redirect per line in the virtual host or the .htaccess file:
Redirect 301 /produits/veste-alpine-2025 /vestes/veste-alpine
Redirect 301 /reservation.php /reserver
For a large number of redirects, prefer a RewriteMap in the virtual host configuration (not available in .htaccess). Reload with sudo apachectl configtest && sudo systemctl reload apache2.
Nginx
Versions Nginx 1.24 and later.
A map table stays readable even with thousands of entries. In the http context:
map $uri $nouvelle_url {
default "";
/produits/veste-alpine-2025 /vestes/veste-alpine;
/reservation.php /reserver;
}
In the server block:
if ($nouvelle_url) {
return 301 $nouvelle_url$is_args$args;
}
sudo nginx -t && sudo systemctl reload nginx.
Cloudflare
Versions Cloudflare dashboard, all plans, November 2026.
Import the list into Bulk Redirects (account level): a CSV file without a header row containing the source URL, the target URL and the 301 code, then a rule that enables the list. For a pattern (a whole directory renamed), create a Redirect Rule from the Rules overview, preserving the query string so that variant or filter parameters carry over.
WordPress
Versions WordPress 6.5 and later, WooCommerce 9 and 10, November 2026.
- Permalink structure (
Settings > Permalinks): choose it once and for all. Changing it changes the URLs of every post. - A post's slug changed: WordPress remembers the old slug of published posts and non-hierarchical content, and redirects automatically. This is not the case for pages, which are hierarchical: add the redirect yourself.
- Redirects: Yoast SEO Premium and Rank Math include a redirect manager; so does the Redirection plugin. Choose a single method to avoid duplicates.
- WooCommerce: the base for product and category URLs is set in
Settings > Permalinks; do not change it on an established site without a redirect plan. A variable product preselects the variant when the address contains its attributes (?attribute_pa_couleur=bleu&attribute_pa_taille=42): use this format for your deep links. The variations form does not update the address when an option is chosen; some themes or plugins do, so check yours.
Shopify
Versions Shopify admin, all plans, November 2026.
- Handle changed: on the product page, in the search engine listing section, Shopify offers a checkbox to create a redirect from the old address when you change the handle. Leave it ticked.
- Manual redirects:
Content > Menus, then “View URL redirects”. They only apply to addresses that return an error: a product set to draft or removed from all sales channels responds with a 404 and can be redirected. - Variants: Online Store 2.0 themes update the address with
?variant=IDwhen an option is chosen. Keep this behavior in a custom theme: it is the link an agent or a user will share.
PrestaShop
Versions PrestaShop 8 and 9.
In Shop Parameters > Traffic & SEO, enable friendly URLs and redirection to the canonical URL with a 301. The default routes contain the identifier (/12-veste-alpine.html): changing the URL text of a product then redirects to the new address thanks to the identifier. Do not change the route patterns (“Schema of URLs” section) on a live store without a complete redirect plan.
Laravel
Versions Laravel 11 to 13.
Keep a history of slugs and redirect from the route:
// routes/web.php
use App\Models\Produit;
use App\Models\AncienSlug;
Route::get('/produits/{slug}', function (string $slug) {
$produit = Produit::firstWhere('slug', $slug);
if ($produit) {
return view('produits.show', ['produit' => $produit]);
}
$ancien = AncienSlug::with('produit')->where('slug', $slug)->firstOrFail();
return redirect()->route('produits.show', $ancien->produit->slug, 301);
})->name('produits.show');
Save the old slug in a model observer on every change (updating, if isDirty('slug')). For fixed redirects, Route::permanentRedirect('/reservation.php', '/reserver');. For filters, use GET forms: the state is in the URL and $request->query() reads it back.
Next.js
Versions Next.js 15 and 16 (App Router).
Fixed redirects in next.config.js (permanent: true returns a 308):
module.exports = {
async redirects() {
return [
{ source: '/produits/veste-alpine-2025', destination: '/vestes/veste-alpine', permanent: true },
{ source: '/blog/:slug', destination: '/guides/:slug', permanent: true },
];
},
};
For a slug changed in the database, call permanentRedirect() from next/navigation in the page when the requested slug is an old one. For filters and variants, write the state into the URL with useSearchParams and router.replace() rather than in React state alone, and read searchParams on the server so that the shared address displays the same thing.
Common mistakes
- A redesign without a redirect plan: the most frequent cause of lost cited links. See create a comprehensive redirect map (opens in a new tab).
- Redirecting every old page to the home page: Google may treat them as soft 404 errors, and the agent does not reach the equivalent.
- Removing redirects after a few months while AI answers and external links still point to the old addresses.
- Variants and filters without a URL: the exact state cannot be shared or reopened.
- Session identifiers or tokens in public URLs: every visit creates a new address.
- Fragment-based routing (
/#/produit/42) in a single-page application: one URL for the whole site as far as search engines are concerned. - Changing a URL to “refresh” a page: freshness shows through the content and the actual update date, not through a new address.
Frequently asked questions
Why does URL stability matter for AI?
Answers from ChatGPT, Perplexity or Google AI Overviews cite specific addresses, and agents keep links in memory to return to a page. These URLs live outside your site, in conversation histories you cannot edit. If the address changes without a redirect, the citation leads to an error and the agent has to search again, sometimes choosing a competitor along the way.
How long should you keep a 301 redirect?
Keep it for at least a year, and ideally indefinitely for pages that receive links, traffic or citations in AI answers. A redirect costs very little to maintain, whereas a broken address loses the visits and the signals it has accumulated. Keep a redirect log versioned with the code so that a redesign or a change of hosting does not delete them by mistake.
Does each product variant need a different URL?
An address that selects the variant is recommended, for example a variant or color parameter, so that a link shared or reopened by an agent displays the right option and its price. Each variant does not need to be a separate indexed page: the canonical tag can point to the main product page. This choice is settled together with the site's variant handling.
Does changing a WordPress post's slug break links?
For a published post, in most cases it does not: WordPress remembers the old slug and redirects to the new one. This mechanism does not apply to pages, which are hierarchical, nor to a change of permalink structure. In those cases, create the 301 redirect yourself with a redirect plugin or at server level, then test the old address.
Resources
- Google Search Central: URL structure best practicesdevelopers.google.com
- Google Search Central: site moves with URL changesdevelopers.google.com
- Google Search Central: redirects and Google Searchdevelopers.google.com
- Google Search Central: JavaScript SEO basicsdevelopers.google.com
- W3C: Cool URIs don't changew3.org
- Shopify: URL redirectshelp.shopify.com
- Next.js: redirectingnextjs.org
Updated on
Topic checklist (PDF)