← All posts

Rebuilding your shop's site with an AI builder: keep every product URL alive with a redirect map

An AI builder can give your shop a new site in a weekend, and quietly break every product link Google and your customers have saved. Here is the redirect map that keeps them working: export, match, upload, test, then watch for two months.

· 7 min read · Async.Shop

AI-assisted

AI site builders have made a full rebuild feel like a weekend job. Describe the shop, pick a look, import the products, publish. What the builder will not do for you is remember where your old pages lived. If your product used to sit at /product/blue-mug-350ml and now sits at /products/blue-mug-350ml, every link to the old address breaks the moment the new site goes live: the Google result, the Pinterest pin, the link in last year's newsletter, the bookmark a regular customer uses to reorder.

Google's own guidance for moving a site with URL changes has the fix, and it is not complicated: map every old URL to its new one, send visitors and crawlers across with permanent redirects, keep those redirects for a long time, and watch both sides of the move. This post applies that to a small shop. Budget an afternoon before the relaunch and ten minutes a week for two months after it.

Before you touch the builder: list every old URL

Planning the structure of your site before the rebuild begins.
Planning the structure of your site before the rebuild begins.

The map is only as good as the list of old addresses. Google suggests building it from several places, because each one misses something. For a small shop, four are enough:

  • Your platform's product and collection export. On Shopify, Products > Export gives a CSV whose URL handle column is the last part of each product address (/products/<handle>). WooCommerce, by default, puts products under /product/. Do the same for categories or collections.
  • Your sitemap. Open yourshop.com/sitemap.xml and save the URLs it lists. It catches pages the product export does not: blog posts, policy pages, the size guide.
  • Search Console. In the Performance report, switch to Pages and export the list. These are the addresses that actually earn clicks, so they matter most.
  • Your analytics landing pages. Old campaign pages and links from other sites often show up here and nowhere else.

Paste them into one spreadsheet column, remove duplicates, and strip the domain so each row is a path such as /product/blue-mug-350ml. Do this before the old site is switched off. Once it is gone, so is the easiest copy of its addresses.

Build the map: one old path, one new path

Add a second column for the new address of each row. The examples here assume a WooCommerce shop moving to Shopify, so old paths use /product/ and /product-category/ and new ones use /products/ and /collections/; swap in your own platforms' patterns. Most rows are mechanical: if the builder kept your product names, /product/blue-mug-350ml becomes /products/blue-mug-350ml and a spreadsheet formula does the work. The rows worth a person's attention are the exceptions:

  • Renamed or merged products. If three colour pages became one product with variants, point all three old paths at the new product. Google says redirecting consolidated pages to the page that replaced them is fine.
  • Products you no longer sell. Redirect only to a genuinely close replacement. If there is none, let the old address return 404 (not found) or 410 (gone). Google's guidance is explicit that sending many old URLs to one unrelated page, such as the new home page, may be treated as a soft 404, which helps neither you nor the shopper.
  • Chains. If an old page was already redirected once, point the oldest address straight at the final one. Google follows up to ten hops but asks you to redirect directly to the destination.

Name the two columns exactly Redirect from and Redirect to. That is the header Shopify's redirect import expects, and it keeps the test script below simple. The finished file looks like this:

Redirect from,Redirect to
/product/blue-mug-350ml,/products/blue-mug-350ml
/product/blue-mug-red,/products/blue-mug-350ml
/product-category/mugs,/collections/mugs
/size-guide,/pages/size-guide

Install the redirects: permanent and on the server

Google recommends server-side permanent redirects, ideally HTTP 301 or 308. A permanent redirect tells Google to show the new address in search results; a temporary one (302, 307) tells it to keep showing the old one. JavaScript redirects and delayed meta refreshes are listed as last resorts, because Google may never see them. If your AI builder only offers a script-based "redirect" block, ask its support how to set real redirects before you launch.

On Shopify, go to Content > Menus > URL redirects > Import, upload the CSV, review and confirm. Two Shopify rules catch people out:

  • A redirect only fires from a broken URL. Shopify's help page says that if the old URL still loads a valid page, the redirect will not work. If the new site happens to have a live page at an old path, the redirect does nothing.
  • There is a ceiling of 100,000 redirects on standard plans, far more than a small shop needs, but worth knowing if you are tempted to redirect every filter combination.

Other platforms have an equivalent: a redirects screen, a plugin, or a rule file on your server. Whatever the tool, the map is the same file.

Test before you tell anyone

Verifying that every link leads to the correct page.
Verifying that every link leads to the correct page.

For a quick check of one address, ask for the headers only and look at the status line and the Location header:

curl -sI https://yourshop.com/product/blue-mug-350ml | grep -iE '^(HTTP|location)'

You want to see 301 (or 308) and the new path. For the whole map, this short Python script reads the same CSV and checks every row against the live site without following the redirect, so it reports exactly what the server sends:

import csv
import sys
import urllib.error
import urllib.request


class NoRedirect(urllib.request.HTTPRedirectHandler):
    def redirect_request(self, req, fp, code, msg, headers, newurl):
        return None


opener = urllib.request.build_opener(NoRedirect)


def check(url):
    req = urllib.request.Request(url, headers={"User-Agent": "redirect-check"})
    try:
        resp = opener.open(req, timeout=15)
        return resp.status, ""
    except urllib.error.HTTPError as e:
        return e.code, e.headers.get("Location", "")
    except (urllib.error.URLError, OSError) as e:
        return "ERR", str(e)


def main():
    csv_path, site = sys.argv[1], sys.argv[2].rstrip("/")
    failures = 0
    with open(csv_path, newline="") as f:
        for row in csv.DictReader(f):
            if not (row.get("Redirect from") or "").strip():
                continue
            old = site + row["Redirect from"]
            want = row["Redirect to"]
            code, location = check(old)
            ok = code in (301, 308) and location.endswith(want)
            failures += 0 if ok else 1
            print("OK  " if ok else "FAIL", code, old, "->", location or "-")
    print(failures, "problem(s)")


if __name__ == "__main__":
    main()

Save it as check_redirects.py and run it with the CSV and your shop's address:

python3 check_redirects.py redirects.csv https://yourshop.com

A FAIL with 200 usually means a live page still sits at the old path (the Shopify rule above). A FAIL with 302 means the redirect is temporary. A FAIL with 404 means the row never made it into the import. A FAIL whose location is an intermediate address is a chain: point that row straight at the final page. ERR means the site did not answer at all. Then click through ten of your best-selling old links in a private browser window, so you see what a returning customer sees.

The launch-day checklist the builder will not show you

  • Remove the staging block. Builders often hide unfinished sites from search with a noindex setting or a robots.txt rule. Google lists leaving these in place as a common migration mistake. Check it the day you go live.
  • Update your own links. Menus, footer, email templates, social profiles and ad campaigns should point at the new addresses directly, not lean on the redirects.
  • Submit the new sitemap in Search Console.
  • Change of Address is only for a new domain. If you move from one domain to another, use Search Console's Change of Address tool. Google says you do not need it for path changes on the same domain.

Keep the redirects, and watch for two months

Google's advice is to keep redirects "for as long as possible, generally at least 1 year", and, from a shopper's point of view, to consider keeping them indefinitely. Old newsletters and pins do not expire, so there is little reason ever to delete the import.

Google also says a medium-sized site can take a few weeks or more before the new URLs show up in place of the old ones, and that rankings may move around in the meantime. That is normal, so do not panic in week one. Instead, once a week for the first two months:

  1. In Search Console's Pages report, look for a jump in "Not found (404)" pages. Each one is a row missing from your map: add it and re-import.
  2. In the Performance report, compare clicks to old and new addresses. Old ones should fall as new ones rise.
  3. In your shop's analytics, compare product page visits and orders with the same weeks before the move.

If clicks fall and do not come back after a few weeks, the map is the first place to look, not the new design. A rebuild can change everything about how the shop looks. The redirect map is what makes sure customers can still find it.

Sources

Keep reading

Free quote

Have a project in mind? We'll quote it for free.

Free · no commitment

Tell us what you have. We'll tell you what it takes.

  1. 1Describe the projectA few sentences is enough — about two minutes.
  2. 2We review itA person reads every request and may ask a follow-up question.
  3. 3You get a free quoteScope, approach and estimate — yours to keep, no strings.
What kind of project is it?
When would you like to start?
Free and without obligation. We use your details only to reply — in your language. Privacy policy