Adding Text, Links and Other Elements to the NetScaler Logon Page - Part 2

By Sam Jacobs posted 12-15-2016 07:55 AM


Part 2: Learn How to Customize the New NetScaler Receiver for Web UI (RfWebUI) Theme

As we discussed in Part 1 of this post, there are three categories of NetScaler customizations:

1) Customizations that do not require any rewrite policies/actions (“policies”) or source code modifications (“modifications”),

2) Customizations that can be accomplished using either policies or modification, and

3) Customizations that will most probably need modification of the source code.

In Part 1, we focused on the Default, Green Bubble, and X1 (the "original") themes. In part 2, we will discuss the newest theme - Receiver for Web UI (RfWebUI), which uses a completely new mechanism.

While the logon page of the theme  looks like the X1 theme:

RfWebUI 1.jpg

... don't let it fool you. If you will be using this theme, you can forget pretty much everything you've learned about customizing the NetScaler logon page.  

Let's begin with the location of the logon page. When using the original themes, the logon page (index.html) is served from the  /netscaler/ns_gui/vpn/ directory. With the RfWebUI theme, the file is served from /var/netscaler/logon/LogonPoint/. The good news is that since the page is now in the /var partition, any modifications to the page (or copies of the logon page) are automatically persisted across a reboot. No longer do you need to add lines to rc.netscaler to copy modified files into the flash partition.

The next major change is how you modify text. The portal wizard allows you to easily make changes to commonly updated text. Let's say you wanted to change the labels on the logon screen. After clicking OK at the bottom of the wizard, you will then be prompted for the language you wish to use:

Theme Language.jpg

After clicking OK, you will see the pages you can modify on the right-hand side of the page.   

 Theme Pages.jpg

Click Login Page. You are presented with the default labels for the page:

Default logon page labels.jpg

Let's modify them as follows:

Modified logon page labels.jpg

Click Ok.

Modified logon page labels 2.jpg

Finally, click Done. Now, let's refresh the page (you may need to clear your cache).

Logon screen with modified labels.jpg 

If you've had experience customizing the original NetScaler themes, at this point you are probably thinking, "Tell me something that I don't already know ... this is no different than modifying any of the other themes!" Not quite ... The portal wizard functions differently depending on which theme has been chosen. For the original themes, the portal wizard would modify the values in the .xml file in the resources directory (e.g. /var/netscaler/logon/themes//resources/en.xml). The keys affected are located under the Partition ID of Logon. Now, what if you wished to modify the text of the logon button above, which you can't do from the portal wizard? No problem. In the same file, as few lines down, we find:

Log On

Simply change it to:

Click to log on

... and then save the file.

Try that with a theme based on RfWebUI and you will find that it doesn't work. In fact, if you look at the .xml file in the resources directory of a RfWebUI-based theme, you will notice that the portal wizard did *not* modify ANY of the keys in that file. What gives??

For RfWebUI-based themes, those text changes are written to /var/netscaler/logon/themes/<theme>/strings..json:


While the portal wizard writes all the values on a single line. I would suggest placing each override on a separate line for readability and maintainability. Also note that this "key":"value" format differs from the XML format of the other themes. 

In order to change other text elements on the page, you will need to get the key to be placed in the override file. The keys may be found in the file /var/netscaler/logon/LogonPoint/receiver/js/localization//ctxs.strings.js. The key for the logon button is nsg_LogOnbutton. Let's add an override for it to the above file:

strings.en.json 2.jpg

Then save the file, and refresh the page. In addition to clearing the cache on your PC, it may take 2-3 minutes for the cache to be cleared on the NetScaler.

RfWebUI 2.jpg

Now, let's try to add our own custom text fields as we did with the X1 theme in Part 1.

Here we come to another major difference. In the original themes, we would:

- Add a

 with a unique id (either via a rewrite action/policy or a modified gateway_login_form_view.js file),

- Add a string with the

's id to the XML file in the resources directory, and finally 

- Add a CSS selector with the

's id to the custom.css file in the selected theme.

Note that everything is keyed off the id of the


With RfWebUI-based themes, text is keyed off of class names, and the class name must begin with _ctxstxt_. So, to add the "authorized users only" warning (see Part 1), we make a copy of the index.html file (let's call it custom.html), and add our custom 


auth users only.jpg

We then add an entry with the text into strings.en.json (without the _ctxstxt_ prefix):

auth users only 2.jpg 

We also need to add style information, but instead of adding it to custom.css, for RfWebUI-based themes, it must go into theme.css. Here you can either use the 

's id (if specified), or the full class name (including the _ctxstxt_ prefix).

auth users css 1.jpg

We can test by browsing to our custom.html file.

Logon screen with auth users only.jpg

Let's not forget our footer ... add another custom 



Then add the text:

auth users only 3.jpg

... and then the CSS:

auth users css 2.jpg

Browsing to our custom page:

Logon screen with footer.jpg 

Our final step is to create a responder policy and bind it to our AG vServer. This will automatically invoke our custom page when we browse to the AG vServer FQDN:

> add responder action "Logon Page Redirect Action" redirect "\"custom.html\"" -responseStatusCode 302
> add responder policy "Logon Page Redirect Policy" "HTTP.REQ.URL.PATH_AND_QUERY.CONTAINS(\"LogonPoint/index.html\")" "Logon Page Redirect Action"
> bind vpn vserver "AG vServer" -policy "Logon Page Redirect Policy" -priority 100 -gotoPriorityExpression END -type REQUEST
> save config

To remove the customizations, simply unbind the responder policy.

Important: Make sure to keep backup copies of all files. Re-running the portal wizard will wipe out any manual updates that you have made to the files.

Here is a handy cheat-sheet summarizing all of the above:

RfWebUI Cheat Sheet.jpg 


Thanks to the NetScaler development team for their assistance, especially Bidyut H.

Sam Jacobs is the Director of Technology Development at IPM, the longest standing Citrix Platinum Partner on the East Coast. With more than 25 years of IT consulting, Sam is a NetScaler customizations and integrations industry expert. He holds Microsoft MCSD, Citrix CCP-M and CCP-N certifications, and is the editor of, a technical resource blog for IT professionals. He is one of the top Citrix support Forum contributors, and has earned industry praise for the tools he has developed to make NetScaler, StoreFront and Web Interface easier to manage for administrators and more intuitive for end users. Sam became a Citrix Technology Professional (CTP) in 2015. Sam can be reached at: or on Twitter at: @WIGuru.



10-30-2019 02:13 AM

Apologies to all asking about links …
Unfortunately, the CUGC blog does not notify authors when comments are added. Please refer to this Discussions post regarding links.
Please feel free to email me directly (

10-29-2019 02:36 AM

Sam, I'm not a developer or a code guy, so I apologize for asking this question. But can you spell it out for me specifically on how to add HTML code to the strings.en.json file? I'm trying to add links to Receiver downloads and I cannot get the syntax right. Every time I do it wrong, the text disappears. When I remove the bad syntax, the text comes back. Any help is much appreciated. Thank you!

07-30-2019 02:37 PM

Adding links and other text to login form.
If you need to add custom links/text inside login form, for example, between password and submit button I recommend to use "Login Schema".
It might be a bit stiff learning curve, but once you get it is simpler to maintain.

Work in Security ->AAA Application traffic
This functionality might depends on your license type. 
In short you need to create:
1) Authentication profile and use it in your gateway
2) Create AAA virtual server
3) Create custom "Login Schema" with custom profile
In this Custom profile you can upload your own XML with custom UI for login screen. Netscaler UI will parse it and shows your extra controls. Create custom scripts in your Theme.
4) In Advance policy create "Policy label"
Put it all together.

It is too complicated to put it in the comments. But I guess this is Citrix expected way to customize login form. This is part of more complex functionality for MFA flow, but it also works for simple UI changes without customizing default code.
This will also will survive Netscaler upgrade and Theme changes in GUI.

07-02-2019 01:32 AM

Hi Sam,

I would also really like to know the easiest way to add a hyper link to a password reset url to my rfwebui theme gateway.

11-29-2018 05:37 PM

Nice Article for NS customisation

Hi Sam,

Thanks for the detailed article on NS portal customiation. would it be possible to include html link to password reset or change on netscaler portal  themes css file?



06-05-2018 06:23 AM


Adding that line to the strings.en.json file worked perfectly. Thanks for your help!

05-23-2018 08:23 AM

Re: Change text in EULA

The NetScaler caches content, so it may take a bit of time for the change to show up. Also, make sure to clear your browser cache.



05-23-2018 08:17 AM

Re: Change text in EULA

Hi Stuart,

The changes would go in:

/var/netscaler/logon/themes//strings.en.json (not .js).

For example:

{"End_User_License_Agreement":"You agree to the following"}



05-23-2018 06:45 AM

Change text in EULA

Hi Sam,

I am having trouble making changes to the EULA text on my NetScaler gatway logon page. Am using the RFwebUI theme on NetScaler 12. I'd like to change the header text on the pop-up box that that appears when you click on 'Terms & conditions'. I'd like to change it from 'End User Licence Agreement' to something else.

I have tried changing the text in the following two files but doesn;t seem to have made any difference:


Do you know which files I need to edit to change this text?


02-20-2018 04:49 AM

Re: Links in text

Hi Sam, 

I solved it myself. We use firmware NS12.0 I use a custom X1 theme together with n-factor authentication on a gateway. In thje strings.en.json I can use without using the codes you mentioned. The cause of my problem was that there were invalid characters in the string which would result in loading a default strings file and no message would be displayed. 

02-19-2018 03:19 AM

Links in text

Hi Sam, 

Great articles, part 1 en 2.. I have used them to put a text below the log on button. It displays the text.. but not the links. I used the HTML codes like you mentioned. 

Try HTML-encoding the brackets ... use < for < and > for >.

(Make sure to include the semi-colon).

But it just displays it as text (

Do you have any tips for me?  


02-01-2018 03:57 PM

Re: Upgrading

Hi Ray,

The answer is that it depends on Citrix.
Before themes were introduced, one needed to modify the actual HTML code, which pretty much changes from one version to another. Copying an older, customized version of a file over the new code base usually rendered the site inoperable.
There's a tremendous advantage to using themes. Besides the fact that you can now use different themes for different vServers, with themes, you don't modify the actual code. You're adding "overrides" to the CSS and Javascript that renders the page. One does that by targeting CSS "selectors," identified either by a div ID, or a class name. So as long as Citrix keeps the same div IDs and class names from one version to the next, the upgrade should be relatively painless. However, there is no guarantee that they will actually do so.


02-01-2018 12:29 PM


How does this affect when upgrading from 11.1 to higher versions?

01-25-2018 09:37 AM

Re: Hyperlink

Hi Stuart,


Try HTML-encoding the brackets ... use < for < and > for >.

(Make sure to include the semi-colon).



01-25-2018 08:27 AM


Hi Sam,

Great article!

Do you know how I can add a hyperlink into either the text below logon prompt or the footer?

I'm using the RFwebUI theme and I can get it to display basic text fine but not a hyperlink. Have tried adding a



05-24-2017 04:01 PM

Re; Issues with Portal Themes

Are you not seeing any customization at all, or only some of it is working ?

Please respond directly to me (, as the system doesn't send me an email when there's a comment. I'm also at Synergy, so responses may be delayed.

05-24-2017 11:24 AM

Issues with Portal Themes


 Thanks for the great article.  I'm finding that the detect receiver screen and log off screen are not being branded with the theme.  I've tried both X1 and Rfwebui themes on NetScaler 11.1 and 12. Have you seen this before?  Thanks