Changing WordPress URLs? How to Handle Redirects and Old Links Cited by AI

TL;DR Changing a URL in WordPress is not just a Google problem. AI tools like ChatGPT, Claude, Perplexity and Gemini can keep citing the old address long after you move the page. The rule is simple: one hop, the new URL returns 200, and the canonical points to the new address. Redirect chains and loops quietly drop pages out of AI answers. After the change you measure citations at the URL level, not just rankings. Semly shows you which addresses AI actually cites, before and after the change.

WordPress URL redirects for AI citations: what actually changes

When you change a permalink in WordPress, you are touching two worlds at once. The first is classic SEO: Google needs to find the new address and pass signals to it. The second is AI visibility: tools like ChatGPT, Claude, Perplexity and Gemini build their own picture of your site, and they often hold on to the old address.

Here is the part most people miss. Being indexed is not the same as being cited. A page can sit happily in Google's index and still never show up in an AI answer. And a page that AI already cites can keep being cited through the old URL, even after you have moved it.

That gap has a name. We call it the citation gap, and it has three states:

  • Cited – AI actively quotes or links your URL in answers.
  • Crawled but not cited – AI fetched the page but never used it in a response.
  • Invisible – AI never reached the page at all.

A redirect that satisfies Googlebot does not automatically satisfy AI crawlers. They behave differently, they cache differently, and they can keep serving an old link in answers for a long time. This is exactly why Semly monitors which URLs are cited across multiple AI models, so you can see whether the old address is still in play.

Na co uważać: do not assume that no traffic means no access. A page can be crawled by AI, never cited, and still be perfectly reachable.

Before you start: what you need and when this method fits

This method works best when you have a clear plan and the right access. Before you touch anything, gather these:

  • A full backup of the site.
  • A list of old URLs and their new targets, mapped one to one.
  • Access to the WordPress admin panel.
  • Access to server files or a redirect plugin.
  • Access to server logs, if you have them.
  • A list of prompts you will test before and after the change.

When this method does not fit: if you have no mapping of old addresses, if the site is in the middle of a bigger domain migration, or if nobody can implement changes on the server side. In those cases, wait until you have those pieces in place.

Step 1: Map old URLs to new URLs

Build the plan before you change anything. Export your old addresses from your sitemap, your logs, or Search Console. Then assign each old URL to exactly one new URL.

Old URL New URL Redirect type
/old-blog-post/ /blog/new-post/ 301
/product/old-name/ /product/new-name/ 301
/removed-page/ (none) 410

Checkpoints:

  • Every old URL has exactly one target.
  • No empty rows.
  • No "just in case" redirects to the homepage.

Questions to ask yourself: where do I get the list of old addresses? What do I do with pages I am deleting? For deleted pages, mark them as 410 so AI and search engines know the removal is intentional.

Step 2: Set up redirects the right way (one hop, permanent)

Use 301 or 308 for permanent changes. The target URL must return 200. Avoid chains. Aim for one hop, and at most two or three for strategic pages.

Type When to use
301 / 308 Permanent move. Target becomes the canonical address.
302 / 307 Temporary move. The old URL stays as the source.
410 Content intentionally removed.

Do not use JavaScript redirects. AI crawlers do not execute JavaScript, so a client-side redirect is invisible to them. Server-side redirects are the safe choice.

Na co uważać: hop limits for AI bots are observed in the field, not officially published. Plan for one hop and treat anything above two as a risk.

Checkpoints: a single URL test shows exactly one hop and a final 200 status. No loops.

Step 3: Fix canonicals and sitemaps

After the move, your signals need to agree with each other. The canonical on the new URL must point to itself and return 200. A canonical should never point to an address that is itself a redirect.

Think of the canonical as a citation ID for AI. When it points at the wrong place, AI gets a mixed message and may skip the page.

Your sitemap.xml should list only the new addresses. Remove old URLs from the sitemap, but keep the redirects active. Also check llms.txt: it must return 200 at the root, and the links inside it must not lead to 404s. If you want a broader plan for making pages citable, this AEO guide for websites walks through the full setup.

Checkpoints: no canonical chains, sitemap free of old URLs, llms.txt returns 200.

Step 4: Check that AI crawlers can still reach the new URLs

This is where silent blocks hide. Check robots.txt and make sure you are not blocking AI search crawlers. Test the new URL with a simple server request. Check logs and IP addresses. Look at your WAF and CDN for 403 or 429 responses. Confirm the content is in raw HTML, not injected by JavaScript.

Bot class Example What it means for blocking
Training GPTBot Controls whether your content feeds model training.
Search OAI-SearchBot Powers citations in AI search answers. Blocking it removes you from those answers.
Agent ChatGPT-User Fires when a user pastes a URL.

Na co uważać: blocking everything "just in case" is the worst option. It removes you from AI answers entirely.

Checkpoints: new URL returns 200, no 403 or 429, new content visible in raw HTML.

Step 5: Measure citations before and after the change

Run the same set of prompts before and after the change. Then check three things: is AI still giving the old URL, has the new URL entered the citation pool, and have the sources changed?

Keep these events separate: mention, recommendation, citation and visit. They are not the same thing, and mixing them up leads to wrong conclusions.

This is where Semly fits in. Semly is the measurement and recovery layer for AI visibility. It shows which domains and URLs AI cites, monitors multiple models, and tracks lost opportunities. It does not perform redirects or edit your server files. It tells you whether the old URL is still being cited and whether the new one has entered the citation pool.

Na co uważać: a realistic observation window is 30 to 90 days. There is no guarantee that visibility returns in a fixed time.

Checkpoints: same prompt set in both measurements, saved dates, and a clear distinction between "old URL still cited" and "new URL not cited yet."

Common mistakes and how to fix them

  • Redirect chain. Cause: multiple redirects stacked over time. Fix: collapse them into a single hop to the final URL.
  • Redirect loop. Cause: two URLs pointing at each other. Fix: break the loop and point both to the final target.
  • Everything redirected to the homepage. Cause: a catch-all rule. Fix: map each old URL to its closest new match, or use 410.
  • Canonical pointing to the old URL. Cause: a missed update after the move. Fix: set the canonical to the new URL and confirm it returns 200.
  • Sitemap with dead addresses. Cause: the sitemap was not regenerated. Fix: rebuild it with only new URLs.
  • Accidental noindex after migration. Cause: a leftover setting or staging config. Fix: check your SEO plugin and reading settings.
  • Blocked in robots.txt. Cause: an old rule left in place. Fix: allow AI search crawlers and re-test.
  • JavaScript-only redirect. Cause: a theme or plugin handling the move. Fix: switch to a server-side redirect.
  • No measurement after the change. Cause: the job was treated as done once redirects went live. Fix: run the same prompt set again and compare.

What to do next

Keep your redirects in place for a long time, at least a year. Refresh the content on the new addresses so AI has a reason to cite them. Fix internal links so they point to the new URLs. Use 410 for content you deliberately removed. Come back to measurement after 30, 60 and 90 days.

If the old URL is still being cited, check whether there is a second, unredirected address for the same content. Duplicates are a common reason an old link keeps showing up.

When to take a different path: for a full domain migration, map everything first and roll out in stages. For single posts, one redirect plus a sitemap update is usually enough.

When you are ready to see the real picture, Semly is where you check which URLs AI cites right now.

FAQ

Does a 301 lose authority? No. A permanent redirect passes signals to the new URL, and the target becomes the canonical address. Keep the redirect in place long enough for search engines and AI to catch up.

How many hops do AI bots tolerate? This is observed in the field, not officially published. Field observations suggest search crawlers are less tolerant than training crawlers, and Googlebot is the most tolerant. Plan for one hop.

Does llms.txt help with citations? It can help AI systems understand your site structure, but it is not a citation guarantee. Make sure it returns 200 at the root and that its links are live. For more on structuring a site so AI can cite it, see this guide to AI search optimization.

Is 410 better than 404? For content you intentionally removed, yes. A 410 tells crawlers the removal is permanent, while a 404 is more ambiguous.

How long should I keep redirects? At least a year. Longer is safer, especially if AI still cites the old address.

Do JavaScript redirects work? Not for AI crawlers. They read the initial HTML and do not execute JavaScript, so a client-side redirect is invisible to them. Use a server-side redirect instead.

Sources

Check if sees your brand

Enter your website to receive a free AI Visibility Report