What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report
What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report
Migrating to Agility
Protect search traffic when you move to Agility: inventory every URL, map old URLs to new ones, load 301 redirects, carry over titles, descriptions and canonicals, ship an accurate sitemap and monitor after launch.
Search engines and other sites know your content by its URLs. When a URL changes or disappears without a redirect, visitors and crawlers that follow it get a 404. This guide shows how to keep every old URL working, carry your SEO metadata into Agility, and catch problems after launch. It is part of Migrating to Agility.
Build one list of every URL the old site serves or used to serve. Pull it from several sources, because each one misses something:
sitemap.xml.link field.Mark the URLs that matter most: top landing pages, pages with external links and pages that convert. Those are the ones you check by hand after launch.
The safest redirect is the one you don't need. Agility gives you control over paths:
Slug. Import the old slugs and the URLs stay the same. See Generating Dynamic Pages From Content.Change URLs only where there's a reason to, and redirect every one you change.
For every URL in the inventory, record where it goes on the new site:
| Old URL | New URL | Code | Notes |
|---|---|---|---|
/2024/05/spring-launch/ | /blog/spring-launch | 301 | Date-based post URL |
/category/news/ | /blog/news | 301 | Category archive |
/about-us/ | /about-us/ | none | Unchanged, no redirect |
/wp-content/uploads/2024/05/guide.pdf | The file's new cdn.aglty.io URL | 301 | A file other sites link to. Use the URL the media library gave you when you uploaded it. |
/old-promo/ | none | none | Retired; let it return 404 or 410 |
Rules that keep the map clean:
| Method | Use it for |
|---|---|
| Import a file in URL Redirections | Most migrations. The file has three columns: OriginURL, DestinationURL and HTTPCode (301 or 302). It must not repeat redirections that already exist. |
Management API: POST /api/v1/instance/{guid}/url-redirections | Creating or updating up to 250 redirects per call from a script. Redirects that fail validation or collide with an existing origin URL are skipped and listed in the response. |
Management API: POST /api/v1/instance/{guid}/url-redirections/import | Importing an Excel file of up to 5000 rows. Optional columns limit a redirect to particular locales. |
| Export | Reviewing the full list, or editing it and importing it back as a bulk update. |
Each origin URL can appear only once in an instance. A redirect can apply to all locales or only to the locales you list, which helps when each language has its own URL prefix.
Agility stores the redirects, and your front end applies them. Your site reads the list from the Content Fetch API (getUrlRedirections in the JavaScript SDK), which accepts a lastAccessDate so a frequent check stays cheap. Test the redirects with the Test action in URL Redirections, which needs a production deployment configured for your sitemap. See URL Redirections and Testing URL Redirections.
Map the old site's SEO fields into Agility during the import, not after launch:
| Old site | Agility |
|---|---|
Page title (the <title> tag) | The page's Page Title, limited to 128 characters, or a meta title field on your content model |
| Meta description | The page's Meta Description, or a field on your model |
| Extra head tags (verification tags, hreflang, structured data) | Additional Header Markup, or generated by your front end |
| Open Graph and social card tags | Generated by your front end from structured fields such as title, summary and image |
| "Exclude from sitemap" or noindex flags | Visible on Sitemap, and your front end's robots handling |
Pages in the sitemap have these SEO fields built in. For items shown through dynamic pages, keep Include SEO fields on all items turned on for the list. See Managing SEO for Editors and Managing SEO for Developers.
Canonical links: have your front end output a <link rel="canonical"> with the absolute production URL of each page. Check that canonicals don't point at the old domain, a staging host or a URL that now redirects.
Internal links: rewrite links inside imported body content to the new URLs during the import. Redirects keep old links working, but links on your own site should go straight to the final URL.
sitemap.xml from your Agility sitemap so it lists the new URLs only. Leave out folders, redirects and hidden pages.lastmod only when you know the real date its content changed. A migration import can make every item look modified on the same day, so consider keeping the source system's modified date in a field and using it until the item is edited in Agility.Faster Indexing with XML Sitemaps and IndexNow shows both in detail.
curl -I and confirm each returns 200 or a single 301 to the right place. Re-run the Agility redirect tests.