All posts

Moving a blog from Webflow or WordPress to Astro + Sanity without losing traffic

Keep every URL you can, redirect every one you can't, move images and authors properly, and watch Search Console after launch. Done this way, a blog move to Astro and Sanity keeps its traffic.

To move a blog without losing traffic, keep every URL you can, 301-redirect every one you can't, move images, authors and categories properly, and watch Search Console closely after launch. Most traffic losses after a migration come from broken URLs and missing content, not from the new platform.

Here's the plan I follow, whether the blog is on Webflow or WordPress. For the bigger picture of a full site move, see my Webflow to Astro migration guide and the WordPress to Astro page.

Step 1: Take an inventory

Before touching anything, list what exists and what earns traffic:

  • Every post URL, from the sitemap or a crawl.
  • Top pages by clicks in Google Search Console, last 12 months.
  • Pages with backlinks, from any backlink tool you use.
  • Categories, tags and author pages, and whether they get traffic.
  • Images, including ones linked from old posts.

This list becomes the checklist for the whole move.

Five stages: inventory, export, import, redirect, launch and watch
The ten steps in this article, grouped.

Step 2: Export the content

From WordPress

WordPress exports posts, pages, categories, tags and authors from Tools, Export as an XML file. The export doesn't contain the image files themselves, only their addresses, so images are fetched separately.

The alternative is the REST API at `/wp-json/wp/v2/`, which is what Sanity's WordPress migration course uses. It reads posts, converts the HTML into Sanity's rich text and uploads images.

From Webflow

Webflow exports each CMS collection as a CSV file from the Designer. Webflow's own help pages describe CSV export as a way to back up or move content to another platform. Rich text comes out as HTML, and images come out as links to Webflow's asset servers, which need downloading before the old site closes.

Comparison of exporting a blog from WordPress and Webflow: format, body, images, authors and categories
Download images before the old site closes.

Step 3: Model the content in Sanity

Before importing, decide the shape:

  • Post: title, slug, summary, body, header image, published date, author, categories, SEO fields.
  • Author: a document with name, role, photo and bio, so every post references it.
  • Category: a document, if categories have their own pages.

This is the moment to clean up. Ten overlapping tags can become three categories, as long as the old tag URLs are redirected.

Step 4: Import

Sanity imports structured data in bulk with the CLI import, from a file with one document per line. A migration script:

  1. Reads each exported post.
  2. Converts the HTML body into Portable Text.
  3. Uploads each image to Sanity and swaps in the new reference.
  4. Links the author and categories.
  5. Keeps the original slug and published date.

Give each document a stable ID, like `post-<slug>`, so you can rerun the import safely while you fix things.

Step 5: Keep URLs the same where possible

The safest redirect is the one you don't need. In Astro, the blog route can match the old pattern exactly:

  • WordPress often uses `/your-post/` or `/2024/05/your-post/`.
  • Webflow uses `/blog/your-post` by default, based on the collection's slug.

Astro can build pages at any path, so match the old structure if the URLs are already clean.

Step 6: Redirect everything that changes

For every URL that changes, add a permanent 301 redirect to its new home. Google's redirects guide says server-side permanent redirects are the most reliable signal that a page has moved. Its site move guide recommends a mapping of old URLs to new ones and says permanent redirects don't lose PageRank.

Where to put them:

  • Astro's config has a redirects option that sends a 301 for each old path.
  • Your host: Netlify, Cloudflare and Vercel all support redirect files, and Apache servers use `.htaccess`.

Don't forget category, tag, author and paginated archive URLs. Redirect them to the closest equivalent, never all to the home page.

Three facts: 301 or 308 means permanent, no PageRank lost through permanent redirects, keep redirects at least 180 days
Redirect every changed URL to its closest match.

Step 7: Carry over the SEO details

For each post, bring across:

  • The SEO title and meta description.
  • The share image.
  • The published date, and an updated date if the post changed.
  • Image alt text.
  • Internal links, updated to the new URLs.

Then generate the structured data and sitemap from the new content. I describe my setup in Astro + Sanity for SEO.

Step 8: Test before launch

On a staging address:

  • Crawl the new site and compare the post count with your inventory.
  • Test every redirect from your list, checking it returns a 301, not a 302 or a 404.
  • Spot-check formatting on the longest and oldest posts.
  • Check images, embeds and code blocks.
  • Run Lighthouse on a few posts.

Step 9: Launch and tell Google

  1. Point the domain at the new site.
  2. Submit the new sitemap in Search Console.
  3. If the domain itself changed, use Google's Change of Address tool.
  4. Use URL Inspection on your top posts.

Step 10: Watch the first weeks

Some movement in rankings is normal while Google recrawls. Watch Search Console's Pages report for new "Not found (404)" errors and fix them with redirects. Google's site move guidance says to keep redirects in place for at least 180 days, and I recommend keeping them indefinitely, since they cost almost nothing.

Real results from my rebuilds

The site rebuilds I've done show what a careful move can add on top of keeping traffic. On Iceberg Quest, moving from WordPress to Astro took the time to main content from 11.0 to 1.4 seconds, and the Lighthouse SEO score from 85 to 100, measured on 8 November 2026. Those are site rebuilds, not blog migrations, and they measure speed and technical health, not traffic.

Bar chart: Iceberg Quest page weight fell from 1.5 MB to 864 KB, files from 112 to 16 and main content time from 11.0 s to 1.4 s
Iceberg Quest, WordPress site vs my Astro rebuild.

Frequently asked questions

Will I lose traffic when I move my blog?

There may be a short dip while Google recrawls. With URLs kept or redirected, traffic usually settles back.

Can I change my URLs during the move?

Yes, if every old URL redirects to its new home with a 301. Fewer changes means less risk.

What happens to my images?

They're uploaded to Sanity during the import. Download Webflow images before the old site goes offline.

How long do redirects need to stay?

Google suggests at least 180 days. I'd keep them for good.

Sources

Planning a blog move? Book a free call and I'll map your URLs with you.

Work with Jeo Web Studio

Tell us about your business and what you want the site to do. Rough notes are fine. We will reply with honest advice, a plan and a fixed price, or tell you plainly if we are not the right fit.

Book a discovery call

A free 30 minute video call. Talk it through before you commit to anything.

Pick a time

Or tell us about your project

We only use your details to reply. See our privacy policy.