How to set up 301 redirects after moving to a vibe coded site
After a move from WordPress, Webflow or Wix, every old address needs a 301 redirect to its new page. Build the map, add the rules on your host, test them.

You moved your site off WordPress, Webflow or Wix and rebuilt it with Lovable, Cursor or Claude Code. The new pages look better. Then Search Console fills with "Not found (404)" rows, and the posts that used to bring visitors stop showing up in search. The new pages are fine. The old addresses lead nowhere.
A 301 redirect fixes that. It tells browsers and Google that a page has moved for good, and where it went. You need one per old address, set on your host, and kept for at least a year. This post covers the map, the rules for Vercel, Netlify and Cloudflare Pages, a test you can run from your terminal, and what Vunora checks once the new site is live. For the whole move, from what to save before to what to watch after, read how to get website migration SEO right on a vibe coded site.
Why traffic drops after a move
Every page on your old site had an address. Google indexed those addresses, other sites linked to them, and people saved them. Your new site was written from scratch by a coding tool, so its addresses rarely match the old ones. A post that lived at /2023/06/pricing-guide/ now lives at /blog/pricing-guide, or it is gone.
When Google asks for an old address, it gets one of two answers. The first is a 404, which says the page does not exist.
Search Console's Page indexing report puts that case plainly: "This page returned a 404 error when requested."
The second answer is worse. A site that builds its pages in the browser, called client-side rendering, often has a host that answers every unknown address with the app's start page and a 200 status. To Google that can look like a page that says "OK" and shows nothing useful, a soft 404. Why every address on a single page app says 200 covers that case and its fix.
A permanent redirect changes the answer. Google's redirect guide says that for a permanent redirect, Google will "show the new redirect target in search results." It lists 301 and 308 as the permanent codes, and 302, 303 and 307 as temporary ones. For a temporary redirect, Google shows the old address instead. For a move, you want a permanent one.
Google also says where the redirect should live: "we recommend that you use a permanent server-side redirect whenever possible." A redirect in your app's JavaScript comes last on its list: "Only use JavaScript redirects if you can't do server-side or meta refresh redirects."
Build the redirect map
Google's site move guide puts the map first: "It's important to map your old site's URLs to the URLs for the new site." The map is a two-column list, the old address on the left and the new one on the right. Build it before the domain points at the new site, while the old one still answers.
Collect old addresses from every place you can reach. Google names two: "Use your content management system, which can typically provide a straightforward way to get a listing of all URLs that host content," and "Check your server logs for URLs that were visited at least once recently."
Build the map
Export every page and post from the old CMS
Do it while the old account is still open.
Save the old sitemap.xml
Open it in a browser and save the file before you cancel the old plan.
Add what Search Console shows
Open the Page indexing report and add any old address you find there.
Give each old address one new address
The page on the new site that covers the same topic.
Mark the pages with no new home
These answer 404. They get no redirect.
Save the map as a file in your repo, such as redirects.csv. It becomes the input for the rules and for the test below.
A redirect map, three rows
| New address | What the old address does | |
|---|---|---|
| /2023/06/pricing-guide/ | /blog/pricing-guide | 301 to the new post |
| /services/web-design | /services | 301 to the page that now covers it |
| /spring-sale-2022 | None | Answers 404 |
Never send everything to the home page
One rule that sends every old address to / is quick to write and does damage.
Google's site move guide says not to: "Don't redirect many old URLs to one irrelevant single URL destination, such as the home page of the new site."
A visitor who clicked a link to your pricing guide and lands on your home page has to start over, and Google sees the same mismatch. If an old page has no match on the new site, let it answer 404.
Where the rules live on each host
The redirect belongs to whoever answers the request, which is your host. On Vercel, Netlify and Cloudflare Pages the rule goes in a file in your repo, and the host reads it when it deploys.
On a Vite app, a file that has to sit at the root of the built site goes in public/. Vite's docs say files there are "copied to the root of the dist directory as-is."
Vercel
On Vercel, rules go in a redirects list in vercel.json, at the root of your app. Vercel's docs say these rules cover "permanent redirects (308), temporary redirects (307)". A 308 is on Google's list of permanent codes, so for search it does the same job as a 301.
{
"redirects": [
{ "source": "/2023/06/pricing-guide", "destination": "/blog/pricing-guide", "permanent": true },
{ "source": "/services/web-design", "destination": "/services", "permanent": true }
]
}A Next.js app can keep the same rules in next.config.js instead, in an async redirects() function. Vercel allows up to 2,048 redirects in the list.
Netlify
Netlify reads two places: a plain text file called _redirects in the folder it deploys, and [[redirects]] tables in netlify.toml. Its docs say the status is "301 by default", and that "Rules in the _redirects file are always processed first, followed by rules in the Netlify configuration file."
/2023/06/pricing-guide /blog/pricing-guide 301
/services/web-design /services 301Order matters: "The redirects engine will process the first matching rule it finds, reading from top to bottom." Put exact addresses above any pattern that could catch them first.
Cloudflare Pages
Cloudflare Pages reads a _redirects file from your build output too. Each line is [source] [destination] [code?]. Here the default code is 302, a temporary redirect, so write 301 at the end of every line. One file holds up to 2,000 static redirects and 100 dynamic ones.
A tool that hosts the site for you
If your site runs on the coding tool's own hosting, look in that tool's docs for redirect support before the domain moves. If you cannot add a permanent redirect there, you cannot keep the old addresses alive, and that is worth knowing before launch day.
Read redirects.csv in the root of this repo. Each row has an old path and a new path. 1. Tell me which host this site deploys to, and which file it reads redirects from: vercel.json, next.config, netlify.toml or a _redirects file. 2. For every row, add a permanent redirect from the old path to the new path in that file. Keep every rule that is already there. 3. Flag any row whose new path does not match a route in this app. 4. Flag any old path that would redirect to another old path, so no address takes two hops. 5. Show me the diff and wait for my yes before you commit.
Paste it in your tool, opened in your site's repository.
Test every redirect
Once the new site answers on your domain, test from your terminal. This command asks for one old address, follows each redirect, and prints each status and the address it points to:
curl -sIL https://yourdomain.com/2023/06/pricing-guide | grep -iE "^HTTP|^location"A good answer has a 301 (or a 308 on Vercel) with a location line naming the new address, then a 200. To test the whole map, put the old paths in a file, one per line, and loop over it:
while read path
do
printf "%s " "$path"
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" "https://yourdomain.com$path"
done < old-paths.txtRead each line of the output:
- 301 or 308 and the new address. The rule works.
- 200. The old address still serves a page, often the app's start page. Add the rule.
- 404. No rule matched. Check the spelling and the trailing slash.
- 302 or 307. The rule is temporary. Make it permanent.
Check for chains as well. If an old address redirects to another old address that redirects again, every visit takes two hops. Search Console's Page indexing report lists a "Redirect error" for, among other things, a chain that is too long and a redirect loop. Point every rule straight at the final address.
Then open a few old addresses in Search Console's URL Inspection tool and choose Test live URL. Google's help page says "the tool fetches and examines the URL in real time", so you see what Google gets today.
Keep the redirects for at least a year
Google's advice is to "Keep the redirects for as long as possible, generally at least 1 year." Links on other sites never update themselves. Take the redirect down and their visitors land on a 404 again.
Two more steps from the same guide finish the job. "Change the internal links on the new site from the old URLs to the new URLs," so your own pages skip the hop. And make sure "the rel="canonical" link annotations on the new site are using the new URLs."
The canonical URL tells Google which address is the real one. When a coding tool's own subdomain serves the same pages as your domain, how to stop a Lovable subdomain beating your domain walks through the fix.
If the domain changed too, Google says to "submit a Change of Address in Search Console for the old site." Then submit the new sitemap. How to build and submit a sitemap.xml for a React or Vite site covers that step.
How Vunora checks redirects after the move
Vunora imports a Next.js, Vite with React or TanStack Start site from its GitHub repo. It does not import the old WordPress, Webflow or Wix site, and it never hosts your site. What it does is check the new site with its SEO checklist, after each import, after each publish and every Monday. On your live site, a run reads "robots.txt, sitemap.xml, redirects, up to 50 pages and the links between them." Two of its checks matter after a move.
- No broken links. To pass: "No internal link returns a 4xx or 5xx".
- No redirect chains. To pass: "One redirect hop at most". When every page passes, the check says "Every page checked loads in one redirect or none."
Broken addresses get their own screen. Open SEO, then Links. Each broken address has a card. When Vunora knows where the page went, the card says "Best fix: point the link at" that page, and you can change the link. When it does not, the card says "Best fix: add a redirect" and asks you to pick the page the address should lead to.
Add a redirect from the Links tab
Pick a page
The published page this address should lead to.
Choose Add a redirect
Vunora shows Check this redirect before it goes live, with the old address and the page.
Choose Confirm redirect
The redirect goes live, and the card says Redirect added.
Wait for the next weekly check
It confirms that your site sends visitors there.
Vunora refuses a redirect that would hide a real page, with "A page on your site answers at this address, so a redirect would hide it. Point the link at a page instead." It also takes paths only, and says so for anything else: "That address has a query, a fragment or a space, so it cannot take a redirect. Use the path alone."
These redirects live in Vunora. Your site serves them once it runs Vunora's code, which Deployment setup in your site's settings walks through. If it does not, the Links tab says "Your site is not serving Vunora's redirects" and points you there. When your team changes the address of a published page or post in Vunora, Vunora keeps a redirect from the old address to the new one, so a rename does not break links.
Where this stops
- Vunora does not build your redirect map. The old addresses come from your old CMS, its sitemap, your server logs and Search Console.
- The Links tab sees links inside your site. An old address that only Google or another site links to does not show up there. Search Console's Page indexing report is where you find those.
- Vunora does not write your host's redirect files from the Links tab. Rules in
vercel.json,netlify.tomlor_redirectsstay yours to keep. - Vunora imports Next.js, Vite with React and TanStack Start from GitHub. It does not import WordPress, Webflow or Wix sites, and it does not host your site.
- No redirect promises traffic. It hands Google the new address. When the new pages show up in results is Google's call.
Questions
How long until traffic comes back after a site move?
Google gives no fixed date. Its site move guide says to "Expect temporary fluctuation in site ranking during the move" and that "it can take a few weeks or more for Google to gradually start showing the new URLs instead of the old ones."
Is a 301 better than a 302 for a site move?
Yes. Google treats a 301 or a 308 as permanent and shows the new address in results. A 302, 303 or 307 is temporary, so Google keeps showing the old address.
Do redirects keep the query string?
On Vercel, a rule's source matches the path only, and Vercel's docs say "The request's query string passes through to the destination." On other hosts, read the host's redirect docs before you rely on it.
Should a page with no new home redirect somewhere?
No. Google says not to send many old addresses to one unrelated page such as the home page. Let those addresses answer 404.
When can I remove the redirects?
Google's advice is to keep them "for as long as possible, generally at least 1 year." Links on other sites keep pointing at the old addresses long after the move.
Sources
- Google Search Central, How to move a site (site move with URL changes), read December 1, 2026: https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes
- Google Search Central, Redirects and Google Search, read December 1, 2026: https://developers.google.com/search/docs/crawling-indexing/301-redirects
- Search Console Help, Page indexing report, read December 1, 2026: https://support.google.com/webmasters/answer/7440203
- Search Console Help, URL Inspection tool, read December 1, 2026: https://support.google.com/webmasters/answer/9012289
- Vercel, Configuration Redirects, read December 1, 2026: https://vercel.com/docs/routing/redirects/configuration-redirects
- Netlify, Redirects and rewrites, read December 1, 2026: https://docs.netlify.com/manage/routing/redirects/overview/
- Cloudflare Pages, Redirects, read December 1, 2026: https://developers.cloudflare.com/pages/configuration/redirects/
- Vite, Static Asset Handling (the public directory), read December 1, 2026: https://vite.dev/guide/assets
Terms in this post
New posts by email
One email when a post goes up, about editing and publishing a vibe coded site.


