---
title: ToolRouter — Agent Use Case Guide
description: Step-by-step guide for completing a task with a specific AI agent using ToolRouter.
url: https://toolrouter.com/tools/site-crawler/use-cases/find-404-errors/copilot
---
# How to Find 404 Errors with Copilot

Copilot finds 404 errors and connects them to the routing configuration in your codebase. See which URLs return errors, then fix the routes, add redirects, or restore missing pages directly in your IDE. This integrated approach is particularly effective for developers managing routing in frameworks like Next.js or Remix.

## Setup

{"mcpServers":{"toolrouter":{"command":"npx","args":["-y","toolrouter-mcp"]}}}

## Steps

1. Add ToolRouter to Copilot MCP config
2. Ask: "Crawl mysite.com and report all 404 errors"
3. Review the broken URL list inline
4. Ask Copilot to add redirect rules to your configuration file
5. Re-crawl to verify all 404s are resolved

## Example Prompt

```
Find all 404s on mysite.com and generate redirect rules for my vercel.json or next.config.js.
```

## Tips

- Copilot can add redirects directly to your routing config
- Search your codebase for hardcoded broken URLs
- Run before deployments as a pre-merge check
