---
id: remove-doc
title: Move or Remove a Doc
description: How to move or remove a Sumo Logic doc without breaking URLs by creating a 301 redirect, updating inbound links, and removing it from the sidebar.
keywords:
- remove a doc
- move a doc
- 301 redirect
- deprecate documentation
slug: /help/docs/contributing/remove-doc/
canonical: https://www.sumologic.com/help/docs/contributing/remove-doc/
---
import useBaseUrl from '@docusaurus/useBaseUrl';
When you move a doc or remove it altogether, that deletes its URL. Visiting the old URL will return a `404 - Page Not Found` error, which negatively impacts customer experience and can damage our SEO.
To prevent this, create a 301 redirect. Follow these steps to ensure a smooth transition and maintain the health of our docs site.
:::tip Recommended: Use Claude Code
If you have [Claude Code](https://claude.ai/code) installed, this repo's `/remove-doc` slash command automates the steps below, including creating the redirect, updating internal links, and removing the doc from navigation. See the [README](https://github.com/SumoLogic/sumologic-documentation#claude-code-tooling) for the full command list and which ones require internal access.
:::
## Prerequisites
import DocPrereq from '../reuse/contributing/doc-prerequisites.md';
## Step 1: Fork the Sumo Docs repository
import ForkRepo from '../reuse/contributing/fork-repo.md';
## Step 2: Create a 301 redirect
As an example, let's say there are two docs called **Nginx App** and **Nginx (Legacy) App**, and we need to deprecate the latter.
1. In your GitHub authoring tool (like VS Code), open the [cid-redirects.json file](https://github.com/SumoLogic/sumologic-documentation/blob/main/cid-redirects.json), which contains all 301 redirects.
1. Add a redirect from the old URL you're removing to the new URL containing the equivalent content.
```json
"/docs/integrations/web-servers/nginx-legacy": "/docs/integrations/web-servers/nginx",
```
## Step 3: Update internal links
Ensure any internal links pointing to the deleted doc are updated to the new URL.
1. In your GitHub authoring tool, run a search for the URL you're removing. For example, if the legacy URL appears in other documents, replace all instances with the new URL.
:::warning
Never do a Find All > Replace All, as this can break unrelated items like image paths. Replace each URL one at a time.
:::
1. If applicable:
* Remove from its parent index.md hub page.
* Remove from [Product List](/docs/integrations/product-list/).
## Step 4: Delete the doc file
Delete the actual .md doc file from the repository (in this example, it would be `docs/integrations/web-servers/nginx-legacy.md`).
## Step 5: Remove doc from navigation
Remove the doc from the navigation menu ([sidebars.ts](https://github.com/SumoLogic/sumologic-documentation/blob/main/sidebars.ts) file).
## Step 6: Preview your changes
import Preview from '../reuse/contributing/preview.md';
## Step 7: Submit your request
import Submit from '../reuse/contributing/submit.md';
## Step 8: Test the redirect
After your pull request is merged and deployed, visit the old URL and verify that it performs a 301 redirect to the intended destination.
## What happens next?
The Docs Team will review your pull request, provide feedback, and merge approved changes to staging. They'll handle production updates separately.
## Optional steps
### Add deprecation note
If you're deprecating one solution in favor of another (like in the above **Nginx** and **Nginx (Legacy)** example), you may also want to [add a note](/docs/contributing/style-guide#admonitions) in the new doc stating the legacy solution has been deprecated. Check with a subject matter expert to be sure.
### Hide from search engine results
It can take months for an old URL to drop from Google search engine results. If you need to hide a page immediately from Google, [open a GitHub Issue](https://github.com/SumoLogic/sumologic-documentation/issues/new/choose) and provide the details for our site admin.
### Exclude pages from the site build
You can prevent content from being indexed by excluding it from compilation entirely. Pages that aren't compiled into the build output won't appear on the live site or sitemap, so neither search engines nor internal site search can index them.
To exclude docs, add their paths to the `docs.exclude` setting in `docusaurus.config.js`:
```js title="docusaurus.config.js"
presets: [
[
'@docusaurus/preset-classic',
({
docs: {
exclude: [
'**/reuse/**',
'**/ja/**',
],
},
}),
],
];
```
Any Markdown files in the listed directories are excluded from the build and won't be served or indexed. Note that `reuse` files are still embedded where referenced; they just won't compile as standalone pages.
For finer-grained control, such as keeping a page compiled but hidden from search, use `robots.txt` or `noindex` meta tags instead. If content should never be published at all, excluding it from compilation is the most reliable approach.
If a document has already been indexed and needs to be urgently removed from Google search results, follow [Google's removal instructions](https://support.google.com/webmasters/answer/9689846?sjid=11985967130976965420-NC).