一键导入
redirection
// How to delete, rename, or move articles on Microsoft Learn while preserving Platform IDs, preventing broken links, and managing redirects.
// How to delete, rename, or move articles on Microsoft Learn while preserving Platform IDs, preventing broken links, and managing redirects.
Required when reviewing, updating, auditing, or creating any concept documentation page. Covers code accuracy checks against source repos, language parity across zone pivots, parity table comments, and structural consistency.
How to reference code from sample repos in Agent Framework docs pages using :::code directives, snippet tags, zone pivots, and highlight attributes.
How to configure cross-repository references (CRR) and create API class links for Microsoft Learn docs in this repository.
How breadcrumbs work on Microsoft Learn: structure, creation, configuration in docfx.json, and best practices for documentation repos.
Conceptual organization of Agent Framework documentation and samples. For language-specific details (file naming, provider setup, code patterns), see each code repo's skills files.
How to create, structure, and configure table of contents (TOC) files for Microsoft Learn documentation using toc.yml and docfx.json.
| name | redirection |
| description | How to delete, rename, or move articles on Microsoft Learn while preserving Platform IDs, preventing broken links, and managing redirects. |
This skill describes how to properly redirect content when articles are deleted, renamed, or moved on Microsoft Learn. Proper redirection prevents broken links, avoids 404 errors, and ensures the Platform ID algorithm correctly associates the new location with the original content.
Redirection is always required for:
These operations are treated as "remove and replace" by the platform, not as in-place updates.
Redirects are managed in a JSON file at the repo root, typically named
.openpublishing.redirection.json. Each entry maps an old source path to a
new target URL.
{
"redirections": [
{
"source_path_from_root": "/articles/ai-services/content-safety/concepts/custom-categories-rapid.md",
"redirect_url": "/azure/ai-services/content-safety/concepts/custom-categories",
"redirect_document_id": true
}
]
}
| Property | Required | Description |
|---|---|---|
source_path_from_root | Yes | Absolute path to the old file in the repo. Must start with /. |
redirect_url | Yes | Target URL — can be a relative path, a site-relative path on Microsoft Learn, or an external URL. |
redirect_document_id | No | Set to true to transfer the document ID (and reporting data like page views and rankings) from the old article to the target. Defaults to false if omitted. |
The Platform ID is a unique identifier for Learn documents, designed to replace the Document ID system. Unlike Document ID, the Platform ID is automatically generated based on content similarity and URL redirection relationships.
Don't change content during file operations. The Platform ID relies on a 90% content similarity threshold. If similarity drops below 90%, the platform treats the documents as distinct entities with different IDs. Rename or move first, then make content changes in a separate PR.
Eliminate duplicate content:
[!WARNING] Not following redirection policies risks losing historical BI data. The Platform ID is also used by recommendations and search services — changes to the ID can make content inaccessible or degrade search results.
Add the ROBOTS: NOINDEX metadata as the last entry in the article's YAML
frontmatter, then republish:
ROBOTS: NOINDEX
This tells search engines not to index the page while still allowing crawlers to follow links on it to other pages.
author in the article's metadata (update if not)..openpublishing.redirection.json pointing to an
appropriate replacement page.Same process as renaming — create the file in the new location, delete the original, add the redirect, and update the TOC.
Don't rely on redirects alone for internal links. After any file operation, scan for and update cross-references:
# Find all files linking to the old article
Get-ChildItem -Recurse -Include *.md |
Select-String '<old-article-name>' |
Group-Object Path |
Select-Object Name
Update or remove these cross-links in the same or a follow-up PR.
After your PR merges, complete these steps:
| Step | Details |
|---|---|
| Test redirects in staging | Verify the old URL redirects to the correct target before signing off |
| Update FWLinks | Check the FWLink tool for any links pointing to the old article and update them |
| Manage inbound links | Identify high-traffic non-Microsoft inbound links (blogs, forums) and coordinate updates if possible |
| Remove search cache (rare) | Only if content must be removed urgently for legal or severe customer issues — use Bing and Google removal tools |
| Review old redirects | Periodically review and clean up redirect entries based on your org's retention policy |
| Check Platform ID Dashboard | Verify that file URL changes follow best practices |
When you delete, rename, or move an article, you must also update the
corresponding TOC entry to reflect the new file path.
If the move changes the article's URL structure, verify that the
breadcrumb tocHref mappings still apply correctly.