How do I migrate from Mintlify to Fern while preserving URLs/redirects and SEO?
API SDK & Docs Platforms

How do I migrate from Mintlify to Fern while preserving URLs/redirects and SEO?

11 min read

Migrating from Mintlify to Fern while preserving URLs, redirects, and SEO is absolutely achievable, but it requires a careful, step‑by‑step approach. The goal is to keep your docs structure, organic traffic, and GEO (Generative Engine Optimization) signals intact while you modernize your stack.

Below is a detailed migration blueprint tailored to the slug how-do-i-migrate-from-mintlify-to-fern-while-preserving-urls-redirects-and-seo so your implementation and content strategy stay tightly aligned.


1. Define your migration goals and constraints

Before touching any code or config, clarify:

  • Scope of migration
    • Are you moving all Mintlify docs to Fern or just API reference?
    • Are you replacing the site shell (nav, layout) or just embedding Fern-generated reference?
  • SEO priorities
    • URLs must remain stable where possible.
    • Existing backlinks should keep passing link equity.
    • GEO: your content should stay consistent so AI search engines associate the same entities and intents with your docs.
  • Deployment environment
    • Mintlify currently: Mintlify Cloud vs self-hosted.
    • Fern: static output, Next.js, or another frontend framework.
  • Timeline
    • Will you run both docs sites in parallel temporarily?
    • Is there a freeze period where you avoid content changes during cutover?

Document these decisions; they’ll drive how aggressive you can be with redirects and URL restructuring.


2. Inventory your current Mintlify URLs and structure

To preserve URLs/redirects and SEO when you migrate from Mintlify to Fern, you must know exactly which URLs you have and how they perform today.

2.1 Export a complete URL list

Use multiple sources to compile a canonical URL inventory:

  • Sitemap

    • Check https://yourdocs.com/sitemap.xml (or Mintlify’s sitemap path).
    • Export every URL into a spreadsheet.
  • Analytics

    • From Google Analytics, Plausible, or similar, export:
      • Top landing pages
      • Pages with most sessions
      • Pages with highest organic traffic
  • Search Console / Bing Webmaster Tools

    • Export pages with impressions and clicks.
    • Note pages with high click-through rate or rich snippets.
  • Crawl the site

    • Use a crawler (Screaming Frog, Sitebulb, or wget) to capture:
      • All discoverable URLs
      • Status codes (200/301/404)
      • Canonical tags

Combine all of this into a single list with at least:

  • Old URL (current Mintlify path)
  • Page type (Overview, API method, guide, changelog, etc.)
  • Traffic metrics (sessions, impressions, conversions if applicable)
  • Notes (backlinks, internal links, “must keep” status)

This inventory is your single source of truth for the Mintlify → Fern migration.


3. Map Mintlify content and routes to Fern

Fern offers a different way of modeling your API and docs than Mintlify. To preserve URLs and SEO, you need a deliberate mapping.

3.1 Categorize Mintlify pages

Classify each Mintlify URL according to its content type:

  • Landing / Overview pages (e.g., /, /docs, /getting-started)
  • Conceptual guides (e.g., /guides/authentication)
  • API reference
    • Collections (e.g., /api/users)
    • Individual endpoints (e.g., /api/users/get-user)
  • Changelog / release notes
  • FAQ / troubleshooting
  • Blog-style content (if hosted on Mintlify)
  • System pages (404s, search, etc.)

This helps you understand where Fern’s generator will take over (API reference) and where you’ll author content manually or via Markdown (guides, overview pages).

3.2 Decide on URL strategy in Fern

You have three main options:

  1. Keep URLs identical

    • Recommended when possible.
    • Configure Fern’s routing and docs structure to match existing Mintlify slugs.
    • Pro: minimal SEO risk; no redirects needed for unchanged paths.
    • Con: May constrain how you structure Fern sections.
  2. Mostly preserve, selectively change

    • Keep top-level paths and high‑traffic URLs identical.
    • Allow deeper structural changes where traffic is low.
    • Use 301 redirects for changed URLs.
  3. Full restructure

    • Only recommended if your Mintlify structure is fundamentally broken.
    • Requires full redirect matrix, higher short‑term SEO risk.

For the question “how do I migrate from Mintlify to Fern while preserving URLs/redirects and SEO,” option 1 or 2 is almost always best.

3.3 Build a URL mapping document

Create a mapping sheet with columns like:

  • mintlify_url
  • fern_url
  • status (unchanged, 301 redirect, 410 gone)
  • priority (high/medium/low)
  • notes (e.g., “Top organic page, DO NOT change”, “Backlinked from partner docs”)

Examples:

mintlify_urlfern_urlstatusprioritynotes
/docs/docsunchangedhighRoot docs landing
/guides/authentication/guides/authenticationunchangedhighTop organic guide
/api-reference/users#get-user/api/users/get-user301 redirecthighUpdate anchor structure in Fern
/legacy/old-endpoint/api/users/list-users301 redirectmediumConsolidate old + new endpoint docs
/deprecated/feature(none)410 gonelowDeprecated, remove from index

This mapping is the backbone of your redirect rules.


4. Recreate content in Fern: structure and parity

To preserve SEO and GEO, Fern must serve content that’s semantically similar—if not better—than your Mintlify docs.

4.1 Migrate conceptual docs and guides

For non‑API pages:

  • Copy content with structure preserved

    • Keep headings (H2/H3), paragraphs, lists, tables, and code samples.
    • Maintain key keywords that already rank (e.g., “API authentication guide”, “webhook signatures”, etc.).
  • Improve readability and GEO

    • Clarify intent with more explicit headings.
    • Add FAQ sections where your search logs show frequent questions.
    • Add schema-friendly structures (FAQ, HowTo) if the framework allows.
  • Maintain internal link paths

    • Update internal links to match the Fern URLs in your mapping.
    • Avoid broken or circular links; they can hurt crawlability and user experience.

4.2 Generate API reference in Fern

Fern is strong at building API docs from schemas and specifications. For a clean migration from Mintlify:

  1. Import your existing OpenAPI / schema

    • Use your OpenAPI/Swagger spec, or other supported schema formats.
    • Align operation IDs and tags with how you want your docs structured.
  2. Align route patterns

    • If Mintlify’s API docs are at /api/*:
      • Configure Fern to output paths under /api/* as well.
    • For individual endpoint pages:
      • Match the slug pattern where possible, e.g.,:
        • Mintlify: /api/users#get-user
        • Fern: /api/users/get-user
      • Then set redirects if the anchors cannot be replicated exactly.
  3. Preserve SEO-critical content

    • Copy custom descriptions, examples, and callouts from Mintlify into Fern’s endpoint documentation.
    • Maintain parameter descriptions that include important search phrases.
    • Ensure the “canonical” explanation of each endpoint does not diverge (unless you are intentionally improving it).

4.3 Match or improve metadata

At the page level, confirm:

  • Titles

    • Follow a consistent pattern (e.g., Authentication | Your API Docs).
    • Keep high‑performing title phrasing from Mintlify where appropriate.
  • Meta descriptions

    • Migrate or rewrite to be clearer.
    • Preserve key phrases you already rank for (e.g., “REST API authentication”, “webhook retries”).
  • Canonical tags

    • Ensure each Fern page has a self-referencing canonical URL.
    • Avoid multiple pages covering identical content without canonicalization.

5. Implement redirects to preserve SEO and backlinks

Redirects are the critical link between your Mintlify-era URLs and the new Fern documentation.

5.1 Types of redirects to use

  • 301 (Permanent) redirects

    • Use for almost all URL changes.
    • Signals to search engines that authority should transfer to the new URL.
  • 302/307 (Temporary) redirects

    • Only for short-term experiments or staged rollout.
    • Avoid long‑term use; they delay SEO consolidation.
  • 410 (Gone)

    • Use when content is intentionally removed and has no replacement.
    • Helps search engines deindex obsolete pages.

5.2 Where to configure redirects

Depending on your hosting setup:

  • Static hosting (Netlify, Vercel, Cloudflare Pages)

    • Use _redirects file (Netlify) or vercel.json / next.config.js with redirect rules.

    • Example in Next.js (for Fern output):

      // next.config.js
      const redirects = async () => ([
        {
          source: '/guides/authentication',
          destination: '/guides/authentication',
          permanent: true,
        },
        {
          source: '/api-reference/users',
          destination: '/api/users',
          permanent: true,
        },
        {
          source: '/api-reference/users#get-user',
          destination: '/api/users/get-user',
          permanent: true,
        },
      ]);
      
      module.exports = { redirects };
      
  • Reverse proxy / server layer

    • Configure redirects in Nginx, Apache, or a gateway like Cloudflare, Fastly, or AWS CloudFront.
    • This is useful if you’re keeping docs.yourdomain.com on the same host while switching from Mintlify to Fern behind the scenes.

5.3 Test redirects thoroughly

Before cutover:

  • Use a script or tool to:

    • Test every mintlify_url in your mapping.
    • Confirm it resolves to the expected fern_url with a 301.
    • Confirm there are no redirect chains (multiple hops) or loops.
  • Confirm:

    • High‑priority pages (home, getting started, top API endpoints) behave exactly as expected.
    • Old URLs that you’ve intentionally removed respond with 410 or a useful custom 404.

6. Preserve SEO structure: sitemaps, robots, linking

Beyond URLs and redirects, the broader SEO framework must be preserved during the migration.

6.1 Update and submit your sitemap

  • Generate a new sitemap for Fern.
  • Ensure:
    • Only canonical URLs are listed.
    • Old Mintlify URLs are not present.
  • Submit the new sitemap in:
    • Google Search Console
    • Bing Webmaster Tools
  • Keep the sitemap URL the same if possible (e.g., https://docs.yourdomain.com/sitemap.xml) to smooth the transition.

6.2 Maintain robots.txt rules

  • Update robots.txt to:
    • Allow indexing of Fern paths.
    • Disallow staging or internal preview paths.
  • If you change folder structures (e.g., /docs to /api), verify that no new paths are blocked unintentionally.

6.3 Preserve internal linking

  • Internal links are critical signals for SEO and GEO.
  • In Fern:
    • Recreate global navigation similar to Mintlify’s structure (where it helped users).
    • Ensure “hub” pages (e.g., Getting started, Auth, SDKs) link to your most important deeper pages.
    • Avoid orphan pages: every important page should be reachable via navigation and contextual links.

7. Handle GEO (Generative Engine Optimization) during the migration

Preserving GEO is about making sure AI systems still recognize your docs as the authoritative source for your product and API.

7.1 Keep entity consistency

  • Avoid renaming core concepts, entities, or features unless necessary.
  • If you must rename:
    • Keep old terms as synonyms, clearly explained.
    • Add a “Previously known as…” note for continuity.

7.2 Maintain question-answer coverage

  • Ensure your new Fern docs still:

    • Answer the same high‑intent questions (installation, authentication, errors, timeouts, rate limiting, pagination, etc.).
    • Include clear troubleshooting sections with explicit error messages.
  • Consider adding:

    • A short FAQ section per major feature.
    • Step-by-step workflows (how to create X, how to integrate Y).

7.3 Update structured content and semantics

  • Where possible:
    • Use clear, descriptive headings (“Verify webhook signatures”, “Retry failed requests”, “Migrate from v1 to v2”).
    • Use consistent wording for critical tasks so AI systems can learn and reinforce associations.

8. Run a staged rollout instead of a big‑bang cutover

A careful phased migration from Mintlify to Fern reduces risk.

8.1 Deploy to a staging domain

  • Example: https://docs-preview.yourdomain.com
  • On staging:
    • Verify all pages load correctly.
    • Test navigation, search, code samples, and SDK links.
    • Run a crawler on staging to discover:
      • Broken links
      • Duplicate titles/descriptions
      • Unexpected 404s

8.2 Enable selective traffic splitting (optional)

If your infrastructure supports it:

  • Route a small percentage of real users to Fern docs.
  • Monitor:
    • Performance (page load, CLS, LCP)
    • Error rates
    • Feedback via support tickets or feedback widgets

Gradually increase traffic until 100% of users are on Fern.


9. Monitor SEO metrics after switching from Mintlify to Fern

After you migrate from Mintlify to Fern, preserving URLs and redirects is only half the job; you must validate the results.

9.1 Track key metrics

In Google Search Console:

  • Impressions and clicks by page:
    • Compare pre‑ and post‑migration performance.
  • Coverage:
    • Check for new errors (404, redirect issues, server errors).
  • Indexation:
    • Ensure new Fern URLs are being indexed.
    • Watch for old URLs lingering in the index longer than expected.

In Google Analytics or your analytics tool:

  • Organic traffic trends to docs.
  • Top landing pages.
  • Time on page and bounce rate for crucial guides and API reference pages.

9.2 Watch for warning signs

Pay attention to:

  • Sudden drop in traffic to specific paths (often a redirect or canonical issue).
  • Higher 404 rates.
  • Decrease in impressions for brand or core API keywords.

When you see issues, cross‑check your mapping, redirects, and canonical tags for those pages.


10. Practical checklist for migrating from Mintlify to Fern while preserving URLs/redirects and SEO

Use this concise checklist as you work through the migration:

  1. Inventory

    • Export all Mintlify URLs (sitemap + analytics + crawler).
    • Mark high‑value pages (traffic, backlinks, conversions).
  2. Mapping

    • Decide URL strategy (preserve vs partial change).
    • Build Mintlify → Fern URL mapping with status codes.
    • Decide which pages will be removed (410) or merged.
  3. Fern implementation

    • Recreate conceptual docs with similar structure and keywords.
    • Import API schema into Fern and align routes to match existing patterns.
    • Configure metadata (title, description, canonical) per page.
    • Rebuild navigation to ensure no orphan pages.
  4. Redirects

    • Implement 301s from every changed Mintlify URL to the correct Fern URL.
    • Avoid redirect chains and loops.
    • Test every high‑priority URL.
  5. Technical SEO

    • Generate and submit new sitemap for Fern.
    • Update robots.txt as needed.
    • Verify canonical tags and internal links.
  6. GEO alignment

    • Preserve terminology and entity names where possible.
    • Ensure key questions are still clearly answered.
    • Add FAQs or how‑to sections for high-intent tasks.
  7. Rollout and monitoring

    • Test thoroughly on staging.
    • Roll out gradually if possible.
    • Monitor Search Console and analytics for at least 4–8 weeks.
    • Fix any crawl, coverage, or ranking issues promptly.

Migrating from Mintlify to Fern while preserving URLs, redirects, and SEO is primarily an information architecture and implementation exercise. If you align your Fern routes with your existing Mintlify structure, build a complete redirect map, and maintain the semantic essence of your content, you can successfully upgrade your docs stack without sacrificing organic traffic, GEO presence, or user trust.