Skip to main content

(Expert) Setting up custom URL redirects in the help center using javascript - 지식 베이스 / Developer & Reporting / Portal Customization - Deskpro Support

(Expert) Setting up custom URL redirects in the help center using javascript

Authors list


  • This article is for advanced users, and allows you to set up custom URL redirects on your helpdesk. This is not an official part of the product - we will be using a trick/hack with javascript to create these redirects.

  • This works by embedding code in the 404 page, so if an end user hits a URL which does not exist, they can be redirected to the correct place.

  • This works for both cloud and on-prem customers. Root server access is not required.


As this is an expert customization, this falls outside of scope of standard support, and is something you will need to build and manage yourself.

If you run intoany problems, you should revert your error404.html template to default in the template editor, and save.

When may you need this?

  • If you have a very specific naming convention for your content, and are not able to use our default URLs.

  • You have migrated from a legacy system, and would like to retain old URL’s, for ease of use and SEO.


  1. Write up your redirect rules:

< script >

window.onload = function () {

switch(window.location.href) {

case '':



case '':







< /script >

In this example, these two redirects will occur: >> >>

This can continue indefinitely, you just need to copy and duplicate the 3 lines, case, window, break - as demonstrated in this animation:

  1. You must the paste this into Admin > Help Center > Design > Open Template Editor > Error > error404.html

  1. Press Save, Apply and ensure to Save Settings on your HelpCenter (and for any brands you may want to apply it for)

It should start to function right away.

도움이 되었습니다 Unhelpful

0 of 2 people found this page helpful

댓글 등록

Please log in or register to submit a comment.

Need a password reminder?