URL redirect best practices

Since URL redirect articles and categories aren't traditional knowledge base content, authors sometimes struggle figuring out how best to use them. In this guide, we cover some of the best practices for how to use URL redirects, whether and how to surface them in your search results, and which redirect type setting to use.

How to use URL redirects

URL redirects are most commonly used for these situations:

  • When you want a page in your knowledge base that will direct your readers to a page outside of the knowledge base. The most common examples of this type of redirect are for things like your company's homepage or public marketing materials, a marketing website, a customer portal, your company intranet, or vendor portals or resources your staff use often.
  • When you want a page in your knowledge base to directly open a file stored within your knowledge base. This is most commonly used for PDFs, since it can save readers from having to open the article and click a link to view the PDF. Refer to the KnowledgeOwl W-9 for an example of this type!
  • When you have a category in your knowledge base but you'd like to add another category or article that points to the same place. For example, we have our Webhook notifications in the Integrations, API, and webhooks category. But these are also a type of notification, so we create a URL redirect category in our Notifications category that redirects to the webhooks documentation. This way we don't have to go to the trouble of setting up Shared content articles in the Notifications section.
  • When you have a Default or blog style category that isn't indexed by search, but you want to surface the title in search. Create a URL redirect article that directs to the category.

When not to use URL redirects

URL redirect articles don't work within topic display categories that use the Override Article Links setting because the override gets applied before the URL redirect. If you're using a topic display category, we suggest inserting the link to the file or page as text in the body of the article instead.

URL redirect search best practices

URL redirect categories never surface in search results.

URL redirect articles will surface in search results based on their Title and Summary (or Meta description). But the contents of the page or file you're redirecting to won't be indexed for search.

But never fear! You can still game the search system a bit to help your readers find your URL redirect article.

We still index URL redirect articles' editor contents for search even though that content is never shown to a reader. So you can add any words or content you'd like into the article editor and it will be indexed for search and help readers find this URL redirect article.

For example, you can do things like:

  • If you're redirecting to a PDF, insert a link to the PDF into the article body. We automatically scrape and index the content of PDFs in article bodies, so this grab all the text into the search index for you!
  • Enter a list of keywords or phrases in the article body that should help readers find this URL redirect article.
  • If you're redirecting to text files like Excel spreadsheets or Word documents, copy the text from the file and paste it into the editor. You don't have to worry about formatting it, since readers will never see it, but the text will be indexed for search.

Which redirect type should I use?

URL redirect articles give you the choice to select a Redirect type from two choices:

  • Permanent (301)
  • Temporary (302), the default

Both types will redirect your readers to the selected URL in the same way. So which should you use?

The answer depends on whether your knowledge base content is being indexed by public search engines like Google. The 301 versus 302 distinction only really matters to the search ranking algorithms that public search engines use.

Best redirect type for private knowledge bases

If your knowledge base is completely private/internal, ignore this setting completely. Either Redirect type will work, so you're fine to keep the Temporary (302) default.

Best redirect type for public or mixed knowledge base

If any part of your knowledge base and this article are publicly available, you may want to change this setting for search engine optimization (SEO).

In most cases, the Temporary (302) redirect is fine. With this redirect selected, search engines will still index this article's URL as well as the resource you're redirecting to.

If you don't want search engines to index this article's URL at all—let's say you don't want this article to "compete" in search rankings with the page it's redirecting to—change the Redirect type to use Permanent (301).