Prompt
How do I troubleshoot broken internal doc links after migrating from Confluence?
Latest observation
Here’s a practical way to troubleshoot broken internal doc links after a Confluence migration.
1) Identify what kind of link broke
First determine whether the link was:
- A Confluence page link
Example: links to another page by title, page ID, or old URL. - An anchor link
Example: link to a section within a page, like#install-step. - A file attachment link
Example: PDF, image, or other attachment references. - A macro-generated link
Example: links created by Confluence macros or embedded content. - A relative URL / redirect-dependent link
Example: links that relied on old site structure or redirects.
Different link types usually fail for different reasons.
2) Check whether page IDs changed
A common migration issue is that Confluence page IDs or URL paths changed.
Things to verify:
- Old Confluence URLs used numeric IDs like
/pages/viewpage.action?pageId=123456 - The new system may use slugs, UUIDs, or different routing
- If links were copied as raw URLs, they may now point to nonexistent pages
If you still have the old Confluence export or mapping table, compare:
- old page title
- old page ID
- new page URL
- new page title
3) Look for title collisions and renamed pages
Migration tools often rewrite or rename pages when:
- two pages had the same title
- spaces were renamed
- page hierarchy changed
- special characters were sanitized
If a link used page title lookup rather than a stable ID, it may now point to the wrong page or fail entirely.
Check:
- duplicate titles
- changed spaces/projects
- moved pages that no longer live at the same path
4) Inspect anchor links
Internal links to headings often break after migration because heading IDs change.
Examples:
#Section-1may become#section-1- punctuation and spaces may be normalized differently
- heading hierarchy may have changed
Fix by:
- updating anchors to match the new heading IDs
- avoiding manually typed anchors if your platform generates them automatically
- using the editor’s built-in link picker when possible
5) Verify attachment paths
If images, PDFs, or other attachments are broken:
- confirm the file was migrated
- check whether the attachment name changed
- see whether the new platform stores attachments under a different path
- verify permissions if the file exists but won’t load
Common issue: an attachment link still points to a Confluence download endpoint that no longer exists.
6) Check permissions and access
Sometimes the link isn’t actually broken — the destination is just inaccessible.
Confirm:
- the user has permission to view the target page
- the page exists in the new space/project
- attachments or embedded content haven’t been restricted
- anonymous/public access settings are correct if relevant
7) Compare old and new redirect behavior
Some migrations rely on redirects from old URLs to new ones. If redirects weren’t configured or expired, links fail.
Check:
- old Confluence URLs
- whether your reverse proxy or web server has redirect rules
- whether redirects are case-sensitive
- whether trailing slashes matter
If possible, preserve redirects for:
- old page URLs
- old space paths
- attachment download URLs
8) Search the migrated content for stale links
Do a bulk search for old Confluence URL patterns such as:
viewpage.action?pageId=/display//pages/- old hostnames
Then replace them in bulk if your platform supports it.
Useful approach:
- export all pages
- grep/search for old domains and path patterns
- create a mapping from old URLs to new URLs
9) Validate link formatting in the new editor
Some systems rewrite links if they’re pasted incorrectly.
Check for:
- malformed markdown or HTML
- special characters needing encoding
- mixed absolute/relative links
- links inside tables, callouts, or code blocks that weren’t converted properly
If the content was imported from Confluence storage format, some embedded links may need manual cleanup.
10) Use a systematic link audit
If many links are broken, build a simple audit:
- Crawl all migrated pages
- Extract all internal links
- Match them against valid pages/attachments
- Flag missing targets
- Produce a remediation list by page owner or space
This is often the fastest way to fix large-scale migration issues.
11) Common fixes by cause
- Old page URL → replace with new canonical URL
- Old page title lookup → relink using page picker
- Anchor changed → update heading or anchor text
- Attachment missing → re-upload or fix attachment reference
- Permissions issue → update access controls
- Redirect missing → add server-side redirects
- Conversion bug → manually edit affected pages
12) Best practice for future-proofing
To reduce breakage going forward:
- use the platform’s internal link picker instead of pasting raw URLs
- prefer stable page IDs if your system supports them
- keep redirects from old Confluence URLs
- avoid hardcoded anchors when possible
- run periodic link validation after content moves
If you want, I can also help you with:
- a step-by-step link audit checklist
- a script to find stale Confluence links
- or a migration troubleshooting template for your team.
Brands