SEO & Indexing
Canonical URL Debugging Guide
Debug canonical tags, duplicate URLs, index.html variants, trailing slash behavior and Search Console canonical mismatches. This reference is written as a practical operating note for developers, DBAs and platform teams who need to make the next troubleshooting step visible.
Use it with the live Formalint tools, then keep the final finding in a ticket, release note or runbook so the next person can repeat the same checks.
Good fit for
- A page appears as Duplicate without user-selected canonical.
- formalint.com/index.html and formalint.com/ compete for the same content.
- A tool page is indexed under an older or redirected URL.
Practical workflow
| Step | What to verify |
|---|---|
| Pick the public URL | Choose one HTTPS URL for each page and use it in canonical tags, sitemap entries and internal links. |
| Avoid mixed variants | Do not link to both slash and index.html versions when one should represent the page. |
| Inspect duplicates | Use Search Console URL Inspection for both the preferred and duplicate variants. |
| Fix internal links | Canonical tags help, but consistent internal links make the signal much clearer. |
Command or evidence sample
<link rel="canonical" href="https://formalint.com/regex-matcher.html">Quality checklist
- Confirm the public URL, browser, terminal, deployment or Search Console context.
- Capture the first useful error, header, status, sitemap entry or metric before editing.
- Keep secrets, tokens, cookies and private user data out of copied examples.
- Make one meaningful fix, publish it, then verify the live page rather than the local preview.
- Link the page to related Formalint references so visitors and crawlers can understand the topic cluster.
Common mistake
The common mistake is adding a canonical tag but continuing to link to the duplicate version throughout the site.
Formalint's rule for this topic: improve the page because it helps a real developer, then let Search Console observe the improvement naturally.
Related Formalint references
Continue with Google Search Console Indexing, Sitemap Lastmod Strategy, Static Site Deployment Checklist.
Frequently asked questions
Should this be checked after every release?
Check it whenever the related page, deployment path, crawler signal, browser behavior or user-facing workflow changes in a meaningful way.
Can I use sensitive production data in examples?
No. Redact secrets and personal data before copying commands, URLs, payloads, logs or screenshots into a public tool or support note.