# How do I preserve my internal links when migrating?

> You preserve internal links by updating every one of them to point at the new URLs, in both your templates and your body content, and by keeping the link structure itself intact. Internal links do two jobs: they give crawlers paths to discover your pages, and they pass importance signals between pages, telling search engines which pages you treat as central. A migration threatens both. If your internal links keep pointing at old URLs, they either break into 404s or rely on 301s to bounce every click, which is slower and dilutes the signal. If the new platform flattens your menus or drops contextual links from the body, the structure that distributed importance collapses. So the work is twofold: repoint links to the new addresses, and rebuild the hierarchy of hubs and supporting pages so the same relationships survive. Relying on 301s alone is not enough, because redirects rescue the visitor but leave your own site pointing at the past. WPBuildAI scans your site and returns the URL list and the internal link structure, so you can rebuild the links against the new addresses and confirm none point backward.

Source: https://wpbuildai.com/how-to-preserve-internal-links-when-migrating/
By lawrence-arya · 2026-06-11

---
You preserve internal links by updating every one of them to point at the new URLs, in both your templates and your body content, and by keeping the link structure itself intact. The reason this needs deliberate effort is that internal links do two jobs at once, and a migration threatens both. They give crawlers paths to discover your pages, and they pass importance signals between pages, telling search engines which pages you treat as central. If your internal links keep pointing at old URLs, they either break into 404s or rely on 301s to bounce every click, which is slower and dilutes the signal. If the new platform flattens your menus or drops contextual links from the body, the structure that distributed importance collapses. So the work is twofold: repoint links to the new addresses, and rebuild the hierarchy of hubs and supporting pages so the same relationships survive. Relying on 301s alone is not enough, because redirects rescue the visitor but leave your own site pointing at the past. WPBuildAI scans your site and returns the URL list and the internal link structure, so you can rebuild the links against the new addresses and confirm none point backward.

Internal links often point at host variants people forgot existed, which is why Google's June 2026 guidance asks for Change of Address requests covering [all subdomains and both the www and non-www forms](https://searchengineland.com/for-site-moves-specify-all-domain-variants-with-googles-change-of-address-tool-480552) of the old domain: an internal link to the www variant of a page you already moved is still a link back into the old site.

## What internal links actually do

To preserve internal links well, it helps to know why they matter beyond navigation. Internal links are how crawlers move through your site, following one page to the next, which is how deep pages get discovered at all. They also distribute importance: a page linked from your main navigation and from many articles is signaled as central, while a page no one links to looks peripheral. This is partly why structure influences how pages are valued, a theme consistent with how unevenly ranking strength is distributed, as the [Backlinko analysis](https://backlinko.com/search-engine-ranking) shows. So internal links are not decoration; they are the wiring that carries both discovery and emphasis through your site, and a migration rewires the whole house.

## Two ways a migration breaks internal links

The damage comes in two distinct forms, and you have to address both. The first is the addresses: when URLs change, every internal link that still points at an old URL is now wrong, so it either 404s or depends on a redirect. The second is the structure: a new theme or platform may render your menus differently, flatten a multi level hierarchy, or omit the contextual links you had in your body content, so even links that resolve no longer form the same shape. The first is about where links point, the second is about how links are arranged. A migration can inflict either or both, which is why preserving internal links means checking destinations and structure separately.

## Why 301s are not enough for internal links

It is tempting to think your migration redirects cover internal links too, but they only cover the visitor, not the signal. A 301 from an old URL to a new one means a click on an outdated internal link still reaches the right page, so nothing looks broken. But your own page is still pointing at an old address, so every internal click bounces through a redirect, which is slower, and the importance signal passes through a redirect rather than directly, which dilutes it. As the guides on [site moves](https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes) and [redirects](https://developers.google.com/search/docs/crawling-indexing/301-redirects) make clear, redirects are for the links you cannot edit, like external backlinks. Your own internal links you can edit, so point them directly at the new URLs rather than leaning on the redirect.

## Repoint links in templates and body

Repointing has two locations, and both are easy to half finish. Template links, the menus, footers, sidebars, and related post modules, are usually defined once and updated centrally, so fixing them is efficient but must not be forgotten. Body links, the contextual links inside your articles and pages, are scattered through your content and are the ones most often missed, because they have to be updated within the content itself. Web Almanac 2024 ([HTTP Archive](https://almanac.httparchive.org/en/2024/)) is a reminder of how many links a content heavy site carries, so the body links can number in the thousands. Update both: the templates for structure, the body links for context, so no internal link still points at an old address.

## Rebuild the structure, not just the links

Beyond destinations, preserve the shape. If your old site had hub pages that linked to clusters of supporting pages, recreate those hubs and clusters on the new platform, rather than accepting whatever flat structure the new theme produces by default. If a multi level menu expressed a hierarchy, rebuild that hierarchy instead of collapsing it into a single list. The goal is that the same pages remain central and the same relationships remain visible, so the importance you built up is not redistributed by accident. This is the part that a pure find and replace of URLs misses, because it fixes where links point without restoring how they were arranged, which is what [happens to internal links in a redesign](/what-happens-internal-links-website-redesigned) when structure is ignored.

## Do not strand pages as orphans

A specific failure to watch for is orphaning: a page that loses all its internal links becomes unreachable by crawling, even if its URL still works, because nothing points to it. Migrations create orphans when contextual links are dropped or a menu is simplified, quietly cutting pages off from the structure. Before and after the move, check for pages that no longer receive any internal links, the same exercise as [finding orphan pages before a redesign](/find-orphan-pages-wordpress-before-redesign). An orphaned page is hard for both crawlers and readers to find, so part of preserving internal links is making sure every page that should be linked still is, not just that existing links resolve.

## Steps to preserve internal links

1. **Map the current internal link structure** before the migration.
2. **Repoint template links** in menus, footers, and modules to new URLs.
3. **Repoint body links** inside articles and pages to new URLs.
4. **Rebuild the hierarchy** of hubs and supporting pages, not a flat list.
5. **Check for orphans**, pages left with no internal links.
6. **Confirm no internal link** relies on a 301 instead of pointing directly.

## Worked example: keeping the wiring intact

Imagine a content site with a clear structure, a few pillar guides each linking to many supporting articles, moving to a new platform. The team first maps the link structure so they know which pages are hubs and how the clusters connect. On the new platform they rebuild the menus to express the same hierarchy rather than the theme's default flat menu, and they update the template modules to new URLs. Then they work through the body content, repointing the contextual links inside articles so none rely on the migration's 301s. They check for orphans and find two supporting articles that lost their only links when a sidebar module changed, and they relink them. After launch, crawlers move through the site as before and the pillar pages keep their emphasis, because the wiring was rebuilt, not just patched with redirects, the same completeness as a careful [WordPress migration](/migrate-wordpress-without-losing-seo).

## Limitation: internal links support, they do not substitute

It is fair to keep this in proportion. Preserving internal links keeps your crawl paths and importance signals intact through a move; it does not, on its own, raise a page that ranks poorly for reasons of content or relevance. Internal structure distributes the strength you have; it does not create strength from nothing. So treat link preservation as protecting what your site already earned, alongside keeping content, metadata, and URLs intact, rather than as a growth tactic. A well wired site of weak pages is still weak; the point of preserving the wiring is that your strong pages keep the emphasis and reachability they had, instead of losing it to a careless rebuild.

## Common mistakes

- Relying on 301s for internal links instead of repointing them directly.
- Updating template links but leaving contextual body links on old URLs.
- Accepting a flattened menu that collapses your hierarchy.
- Orphaning pages by dropping the only links that pointed to them.
- Treating internal links as navigation only, ignoring their signal role.

## Key points

You preserve internal links in a migration by repointing every link to the new URLs, in both templates and body content, and by rebuilding the structure so the same hubs and hierarchy survive. Internal links carry crawl paths and importance signals, so links left on old URLs break or lean on 301s, which is slower and dilutes the signal, and a flattened menu collapses the emphasis your structure provided. Do not rely on redirects for your own links; redirects are for the external links you cannot edit. Check for orphaned pages that lost all their links, and confirm no internal link bounces through a redirect. This protects what your site earned, alongside keeping content and URLs intact, and starts from a full [URL inventory](/find-extract-all-urls-website-301-redirects). WPBuildAI scans your site and returns the URL list and the internal link structure, so you can rebuild the links against the new addresses and confirm none point backward. Send your web address for a free analysis.

Not affiliated with WordPress, Lovable, Webflow, Shopify, Wix, or Squarespace.