Citrix XenApp

How to redirect your XenApp Web Interface site to a new URL without breaking PNAgent sites


Had a request today to redirect a XenApp site on an old set of Web Interface 5.4 servers to a new URL as part of a brand change (domain name migration). Normally you could go into IIS and do a 301 or 302 redirect via a secondary site and push traffic to the correct site using host headers and you’d be good. Or even use a Netscaler rewrite policy if the servers were behind one. The catch in my scenario was there were PNAgent sites on the WI that still used the old URL and they had to remain working. Kind of tricky since Citrix puts all it’s sites under the “Default Web Site” by default. I had to make sure the PNAgent site used the old URL while only GUI users navigating to the old URL in their browser would get redirected to the new URL. And I didn’t have the benefit of a Netscaler in front of these servers to help me.

NOTE: If you do want to do a complete migration away from the old URL (on all GUI, PNAgent, Access Gateway sites, etc) and need to update Citrix Receiver Enterprise, the easiest way to update the server URL on them is via GPO. Or you can do it via registry if you have an endpoint management solution. I prefer using group policy. Just remember to keep both URLs working for a bit because not all your endpoints may get the update at the same time. Especially true of laptop/mobile users. PNAgent (Receiver Enterprise) doesn’t handle 301 redirects well in my experience so I prefer they not use a legacy URL and actually get updated/hard coded to the correct URL at some point.

So on to the steps:

1. On your WI servers navigate to “C:\inetpub\wwwroot\Citrix” and you will see all your sites. Create a folder in here called “301Redirect” or whatever makes sense for your company.

2. Inside this folder, create a “default.htm” file. Open it and edit it with the following:


This is a 301 redirect, same as you would do in IIS but without having to mess with the IIS config. By default “XenApp” is your GUI site unless you’ve changed it. I don’t recommend messing with the IIS config unless absolutely necessary since the Web Interface Management console also interacts with the IIS config. I prefer just using code in this instance for the 301. It’s also easier to manage across many Web Interface servers and other people that may come in after you won’t have to dig through the IIS console to see what you have done.

3. Navigate to “C:\inetpub\wwwroot” and edit the “WebInterface.htm”. By default it will say:

so change it to:


4. At this point you should be able to hit the old URL via a web browser and it should redirect you the new URL. Login to the XenApp site and try launching an app. Then try launching an app using Citrix Receiver Enterprise/PNAgent and that should still work as normal since we didn’t touch any of the Services sites. You can even logout and login under Online Plugin Settings just for grins. If you use Access Gateway it should be talking to these services sites too so you don’t have to change anything in your Access Gateway session profiles. The old URL will continue to work there.

Hope this helps. Please post a comment if you run into any issues.

About Jason Samuel

Jason Samuel lives in Houston, TX with a primary focus on strategic advisory and architecture of end-user computing, security, enterprise mobility, virtualization, and cloud technologies from Citrix, Microsoft, & VMware. He also has an extensive background in web architecture and networking over his 20+ year career in IT. He is an Author, Speaker, and Local User Group Community Leader. He is certified in several technologies and is 1 of 63 people globally that is a recipient of the prestigious Citrix Technology Professional (CTP) award. He is 1 of 42 people in the world that has been awarded as a VMware EUC Champion and VMware vExpert. He is a featured author on DABCC which provides the latest IT Community News on Cloud, Data Center, Desktop, Mobility, Security, Storage, & Virtualization. In his spare time Jason enjoys writing how-to articles and evangelizing the technologies he works with. Disclaimer: The content and opinions expressed in articles and posts are his own and are by no means associated with his employer.

Recommended for you


  1. Siegfried

    February 1, 2019 at 4:13 AM


    Thanks a lot!

  2. gdowling

    February 7, 2022 at 4:07 PM

    Will this work if users have the auth\login.aspx file saved as a favorite? Also, would this also work for WI 4.5? I am in the process of disabling old WI 4.5 and 5.4 sites and want to nudge them over to StoreFront 3.12.


Leave a Reply

Your email address will not be published. Required fields are marked *