---
title: "Moving WordPress to an Astro Frontend: What Happens to Your URLs, and What to Check Before You Switch"
url: https://hostmy.blog/wordpress-to-astro-urls-what-to-check/
date: 2026-11-23
modified: 2026-11-25
lang: en
author: "Aditya Sharma"
description: "A way to check old and new URLs before a move from WordPress to Astro, with a script you can run and the URL changes in Hatch Connect 1.1.0."
categories:
  - "Hatch"
image: https://hostmy.blog/wp-content/uploads/2026/11/A3-featured-1024x538.jpg
word_count: 1636
---

# Moving WordPress to an Astro Frontend: What Happens to Your URLs, and What to Check Before You Switch

The question people type is plain: how do I migrate WordPress to Astro without losing SEO? The usual answer is a sentence, keep your URLs and redirect the ones that change, and it is correct and no help at all, because it does not tell you how to check. This post gives you a way to check, a small script you can run on your own site, and a list of what happens to URLs when WordPress hands the public site to an Astro frontend through Hatch Connect 1.1.0, the plugin we make.

We will not promise that any move keeps your rankings. Nobody can, and the Hatch limits below are real. What we can do is show you how to find out what changes before your visitors and Google do.

## What Google says about redirect types

Google's documentation on [redirects and Google Search](https://developers.google.com/search/docs/crawling-indexing/301-redirects) (last updated 16 November 2026) separates permanent from temporary redirects. A permanent redirect is a signal that the redirect target should be canonical, and Google shows the new address in search results. A temporary redirect keeps the source page in search results. The page says to use permanent redirects when you are sure the redirect will not be reverted.

That matters for a move because the type of redirect is a statement of intent. It is not a prediction about rankings, and we are not making one. It is a reason to know, for your own site, which kind you are sending.

## Build the map first

A parity check compares every old URL with the address that now serves the same content. Start with the old URLs, not the new site.

- Export the URLs you care about: your sitemap, your most visited pages from analytics, and the pages that earn search clicks.

- Add the URL types people forget: category and tag pages, author pages, pagination, the feed, and any attachment or media page that is indexed.

- Write the new address you expect for each one. If you expect the same address, write it again so the pair exists.

- For each pair, record four things: the status of the old URL, where it redirects, the status of the final page, and the canonical address that page declares.

- Mark every pair that does not match, and decide for each whether to fix the page, add a redirect, or accept the change.

## A script that does the checking

The script below reads a CSV file with two columns, the old URL and the new URL, and prints the first status and any Location header of the old URL, then the final status, final address, canonical address and title of the new URL. It uses only the Python standard library and sends read-only GET requests. We tested it on 20 November 2026 against the public Hatch demo sites.

`import csv, sys, re, urllib.request, urllib.error

class Stop(urllib.request.HTTPRedirectHandler):
def redirect_request(self, *a, **k): return None

def fetch(url, follow):
opener = urllib.request.build_opener() if follow else urllib.request.build_opener(Stop())
req = urllib.request.Request(url, headers={"User-Agent": "url-parity-check"})
try:
r = opener.open(req, timeout=20)
return r.status, r.geturl(), r.headers.get("Location", ""), r.read(300000).decode("utf-8", "ignore")
except urllib.error.HTTPError as e:
return e.code, url, e.headers.get("Location", ""), e.read(300000).decode("utf-8", "ignore")

def tag(html, pat):
m = re.search(pat, html, re.I | re.S)
return re.sub(r"\s+", " ", m.group(1)).strip() if m else ""

print("old_url,first_status,location,final_status,final_url,canonical,title")
for old, new in csv.reader(open(sys.argv[1])):
s1, _, loc, _ = fetch(old, False)
s2, final, _, body = fetch(new, True)
canon = tag(body, r'<link[^>]+rel=["\']canonical["\'][^>]*href=["\']([^"\']+)')
title = tag(body, r"<title[^>]*>(.*?)</title>")
print(",".join(f'"{x}"' for x in (old, s1, loc, s2, final, canon, title[:60])))`

Save it as `urlparity.py`, put your pairs in `pairs.csv` and run `python3 urlparity.py pairs.csv`. Run it twice, once before the move against the old site, and once after against the new one, so that you can compare the two outputs line by line.

## What the script showed on a Hatch demo

We ran six checks against the public Hatch Editorial demo on 20 November 2026. We do not know which Hatch version the demo runs, so treat this as an example of the method and not as a statement about every release.

| Address checked | Status | What it showed |
| --------------- | ------ | -------------- |
| /blog | 200 | Answers directly. Declares itself as the canonical address. |
| /blog/ (trailing slash) | 200 | Also answers, and declares /blog as its canonical address, so the two stay apart only through that tag. |
| /feed/ | 404 | The themed not found page. The frontend feed is at /rss.xml. |
| /rss.xml | 200 | Answers, with no canonical tag, as a feed would. |
| /sitemap.xml | 301, then 200 | A permanent redirect to /sitemap-index.xml, which answers. |
| /2024/01/hello-world/ | 404 | A WordPress style date address returns the not found page. |

The method found things a quick look would miss. The address with a trailing slash and the one without both answer with a 200, and only the canonical tag tells search engines which one counts. The feed address that WordPress uses returns not found on the frontend. And a WordPress style date address returned a not found page, which is the kind of failure a map would catch before launch. Because the check is a table you can read, you can also show a client exactly what was tested.

## What changes with Hatch Connect 1.1.0

Hatch Connect deploys an Astro frontend and redirects visitors who are not signed in from WordPress post addresses to the frontend. The frontend has its own URL structure. Hatch Dev tested the following on version 1.1.0, or read it in the plugin source.

| Content | On WordPress | On the Hatch frontend |
| ------- | ------------ | --------------------- |
| Post | Your permalink structure | /blog/post-name |
| Page | Your permalink structure | /page-name |
| Category and tag | /category/name and /tag/name | /blog/category/name and /blog/tag/name; the plain /category and /tag addresses are also accepted |
| Author | /author/name | /blog/author/name; /author/name is also accepted |
| Custom post type | Registered address | /rest-base/post-name |
| Date style permalink, such as /2024/01/post-name/ | Works if your permalinks use it | Not found (404) |
| Nested page, with a parent in the address | Works | Not found (404) |
| Date archive | Available on WordPress | Not found (404) |
| Attachment page | Available on WordPress, if enabled | Not supported |
| Blog index with and without a trailing slash | One address | Both return 200 |
| Feed | /feed/ on WordPress | /rss.xml on the frontend with 25 posts; /feed/ on the frontend is not found |
| Sitemap | Your SEO plugin or WordPress sitemap | /sitemap-index.xml, listing the first 100 posts and up to 100 pages and categories, with no tags, authors or custom post types; it ignores noindex settings and also lists password-protected posts |

The redirect from WordPress is a temporary 302 that keeps the path, with the category, tag and author addresses mapped across and paginated pages mapped to the blog index. Hatch does not redirect the login page, the admin area, the REST API, feeds, sitemaps or previews, so those still answer on your WordPress server. If your site uses the post name alone as its permalink, each post answers at both the plain name and under /blog, and each version names itself as the canonical address, so search engines can see duplicates.

For posts, Hatch reads the head from Rank Math. Pages and custom post types declare a canonical address equal to the address requested, query string included, and the blog index declares /blog whether or not the address ends in a slash. The frontend also ignores noindex settings when it builds the sitemap. The canonical host is the workers.dev address unless a custom domain is set, and we have not tested a custom domain. We do not claim that your SEO carries over.

## Before you switch: a checklist

- Look at your permalink settings. If they include a year or month, or if you have nested pages, those addresses return not found on the Hatch frontend in version 1.1.0.

- Build the old to new map for your top pages, your category and tag pages and your feed.

- Run the script and keep the output file.

- Decide whether a temporary redirect is what you want, given what Google's documentation says it means.

- Check the sitemap against your own list: more than 100 posts or any tags, authors and custom post types fall outside what the frontend lists.

- Test on a copy of the site on a workers.dev address first, and run the script again there.

- Keep the old site reachable until the output is clean.

If those checks show a problem you cannot accept, the answer is to wait or to choose another route, and our [checklist on whether to move from WordPress to Astro](https://hostmy.blog/should-you-move-wordpress-to-astro/) covers the other routes. For the redirect side of any migration, our [site migration SEO checklist](https://hostmy.blog/site-migration-seo-checklist/) goes further, and we compare redirect plugins and server rules in [another post](https://hostmy.blog/wordpress-redirect-plugin-or-server-rule/).

## Questions people ask

**How do I migrate WordPress to Astro without losing SEO?** You cannot be sure of keeping rankings, and no guide can promise it. Build a map of old to new addresses, use permanent redirects where the address changes for good, compare status, canonical address and title for every pair, and run the check before and after the move.

**Does Hatch Connect keep my URLs?** No. In version 1.1.0 posts move to /blog and pages to the root, the redirect is a temporary 302, and some WordPress address types return not found on the frontend. Check your permalinks before you switch.

**Is a 302 redirect bad for SEO?** Google's documentation says a temporary redirect keeps the source page in search results, while a permanent one signals that the target should be canonical. Which one you want depends on whether the move is permanent. We cannot tell you what it does to your rankings.

**Can I test this without touching my live site?** Yes. Run the script against a copy and a workers.dev address, and keep the live site as it is until the output matches your map.

## Where Host My Blog fits

Host My Blog makes [Hatch Connect](https://hostmy.blog/plugins/hatch-connect/?utm_source=blog&utm_medium=post&utm_campaign=wordpress-to-astro-urls-what-to-check), a free WordPress plugin that deploys an Astro frontend to a Cloudflare Worker in your own account and keeps WordPress as the editor. It does not move content into Astro. Cloudflare is the only deploy target today, and other targets are planned with no date. The URL behaviour above is version 1.1.0 and we may change it in later releases, so check the plugin page before you plan a move.

Which address on your site would you check first?