Why it matters
Consistent redirects, links, and canonicals help search engines group duplicate versions.
Do it step by step
- 1
Find URL variants caused by parameters, trailing slashes, or duplicate routes.
- 2
Choose the preferred public URL.
- 3
Redirect unnecessary variants when possible; otherwise add a canonical link to the preferred URL.
- 4
Check that internal links and sitemap use the preferred URL.
Example
If /pricing?ref=nav and /pricing show the same page, use /pricing as the canonical.
Check your work
Source and rendered HTML show the intended canonical; duplicate URLs resolve or point consistently to it.
Complete when
The important duplicate patterns have a consistent preferred URL.
Prompt for an AI coding agent
Use this with an agent that can inspect your project. Account and external actions remain yours to complete.
Inspect my existing website project before editing. Resolve duplicate URL versions. Find URL variants caused by parameters, trailing slashes, or duplicate routes. Choose the preferred public URL. Redirect unnecessary variants when possible; otherwise add a canonical link to the preferred URL. Check that internal links and sitemap use the preferred URL. Keep the existing framework and design conventions. Verify the result with the project's checks and by inspecting the rendered page or response. Explain any manual account, hosting, or Search Console steps I must do myself.
Tools and references
Reviewed 2026-11-04