# Set up forms, redirects, and sitemap

https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/forms-redirects-sitemap

Configure your form replacement, generate your redirect map as vercel.json, and set up next-sitemap so your new site handles all three automatically.

---

## Navigation

**Course:** [Migrating from Webflow to Sanity](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity) · [View as markdown](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity.md)

**Previous:** [Validate your import in Studio](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/validate-import-studio) · **Next:** [Set up draft mode and visual preview](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/draft-mode-visual-preview)

---

## Course Contents

1. [Introduction](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/introduction-to-webflow-migration)
2. [Audit your Webflow content](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/audit-webflow-content)
3. [Recognize Webflow's content modeling patterns](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/recognize-content-modeling-patterns)
4. [Export from Webflow and connect the Data API](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/export-webflow-connect-api)
5. [Initialize Sanity and install the migration toolkit](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/initialize-sanity-migration-toolkit)
6. [Map collections to Sanity document types](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/map-collections-to-schemas)
7. [Build a page builder with a sections array](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/page-builder-sections-array)
8. [Model custom-template pages as singletons](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/custom-template-singletons)
9. [Model navigation in Sanity](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/model-navigation)
10. [Create a siteSettings singleton](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/site-settings-singleton)
11. [Handle internal links in Portable Text](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/internal-links-portable-text)
12. [Fetch your collection items from the API](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/fetch-collection-items-api)
13. [Run the asset pre-upload pass](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/asset-pre-upload)
14. [Resolve reference fields from API data](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/resolve-reference-fields)
15. [Convert rich text to Portable Text](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/convert-rich-text-portable-text)
16. [Extract static page content using the page DOM API](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/extract-static-page-content)
17. [Import content with the two-pass pattern](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/two-pass-import)
18. [Validate your import in Studio](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/validate-import-studio)
19. **Set up forms, redirects, and sitemap** *(current)*
20. [Set up draft mode and visual preview](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/draft-mode-visual-preview)
21. [Validate your import without a frontend](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/validate-migration)
22. [Launch checklist and DNS transfer](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/launch-checklist-dns)
23. [AI prompt library and resources](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/appendix-prompt-library-resources)

---

### Forms



Forms don't migrate automatically. This is a full replacement. Choose your form handler before launch:



- [Formspree](https://formspree.io) or [Formspark](https://formspark.io) for straightforward contact forms

- HubSpot embedded forms if you're already on HubSpot

- A custom Next.js API route for forms with logic or webhook requirements


Open `webflow/api/forms.json` , the Forms API returned the complete field schema for every form on your site, including field types, labels, and validation rules. Use this as your spec when recreating forms in your replacement service. You don't need to manually inspect each form in the Designer.



For each form:



1. Recreate fields in your chosen service using the API schema as reference

2. Update notification email addresses

3. Export any submission history you need to retain (available via the Form Submissions API: `GET /v2/forms/{formId}/submissions`)


### Redirects



Export your Webflow redirect list from Site Settings > SEO > Redirects using the CSV export button. Then ask AI to generate `vercel.json`:



```text
Convert this Webflow redirect CSV into a vercel.json file with a redirects array. Each entry should have source, destination, and "permanent": true. Cross-reference pages.json to confirm destination paths exist in the new site — flag any redirects pointing to a URL that has no matching page. Save the file to the project root.
```

Test your redirect coverage before DNS transfer, any Webflow URL without a destination or a 301 becomes a 404 after cutover.



**Enterprise plans: **the 301 Redirects API (`GET /v2/sites/{siteId}/redirects`) lets you fetch the complete redirect list programmatically rather than exporting from the UI. Use it in the same API fetch script from the environment setup chapter to save `webflow/api/redirects.json` alongside your other API data.



### Sitemap and robots.txt



Next.js doesn't generate either automatically. Install next-sitemap and ask AI to wire it up:



```bash
pnpm add next-sitemap
```

```text
Add next-sitemap to this Next.js project. Create next-sitemap.config.js at the project root configured to read SITE_URL from the environment and generate robots.txt. Add a postbuild script to package.json so the sitemap generates automatically on every build.
```

Verify `/sitemap.xml` and `/robots.txt` are accessible after your first deployment.



Next, you’ll set up draft mode and visual preview before launch.



---

## Related Resources

- [Full course as markdown](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity.md)
- [All courses and lessons](https://www.sanity.io/learn/sitemap.md)
- [Complete content for LLMs](https://www.sanity.io/learn/llms-full.txt)

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://www.sanity.io/learn/resource/feedback

```json
{
  "path": "/learn/course/migrating-content-from-webflow-to-sanity/forms-redirects-sitemap.md",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>
