Adding URL Redirects
Over time, it's normal for links to change. But sending a customer to a 404 error page isn't the best experience (although ours are pretty cool!). With HelpDocs, you can redirect your customers to a new URL so they find what they're looking for right away.
Broken links are frustrating—nobody enjoys hitting a 404 error page when looking for information.
While our Smart 404 pages do a great job of guiding lost visitors, wouldn't it be better if your customers never encountered them at all?
With URL redirects in HelpDocs, you can seamlessly guide your visitors from outdated links to the correct destinations. This keeps your Knowledge Base navigation smooth and ensures customers find exactly what they need without frustration.
Setting Up a URL Redirect
- Head to Settings > General (or click here)
- Scroll to the bottom and hit Add Redirect
- In From URL, enter your broken link
- In To URL, enter the new linkMake sure to include /article or /category at the start if you're redirecting from an article or category 🐝
- Hit Save Changes
We think our 404 pages are pretty neat but you can redirect to a custom page of your choice by entering 404 as the From URL. We'll even set a 404 error code for you.
We only apply redirects if we can't find content for the URL in From URL. If you want to redirect from an article or category that exists and is published, you'd need to unpublish or delete it first.
Advanced Pattern Matching
We support advanced pattern/glob matching with minimatch.
Any valid minimatch pattern is valid inside the From URL. That means you can do stuff like /my-redirect/**/* to redirect anything with /my-redirect/ at the start, or !/my-path to redirect anything other than /my-path. The sky's the limit 🌝
Common Pitfalls and Troubleshooting
Even with a straightforward process, redirects can sometimes be tricky. Here's a quick reference for common issues and their solutions:
Issue | Solution |
Redirect not working | Verify you've included the full path in both URLs (e.g., /article/your-slug) |
Redirecting a published article | Unpublish or delete the article first—smart redirects only work when the original content doesn't exist |
Redirect loop | Check that your destination URL isn't redirecting back to the source or to another URL that eventually loops back |
Case sensitivity issues | URL paths are case-sensitive—make sure you match the exact capitalization |
Pattern matching not working | Test your minimatch pattern syntax in a separate tool before implementing |
Redirects not saving | Ensure you've clicked Save Changes after setting up the redirect |
Changes not showing | Try accessing the link in an incognito browser window to avoid cached versions or authentication issues that might mask the update |
Custom 404 page not working | Confirm you've entered exactly 404 (without slashes) in the From URL field |
What did you think of this doc?
Testing Customizations with .dev
Adding Custom Navigation Links