How to properly setup a Vanity URL

Hi Community.

I'm a Sys Admin trying to setup our first K2 servr.

I've gotten it working for the most part.

I'm not sure I solved the URL part however.

I had doem some searchgin and pieced together soem clues from previous versions and other threads, but never saw a coplete solution listed. I thought this was strange as most companies woudl want to use their more friendly URL with their installation.


I want to have my users access the website using the URL as follows:

I've done the following steps to achieve that and it's mostly working.


Authentication, Claims, Issuers, Edit the K2 Windows STS URL accordingly
Realms, Click on the Runtime one, Then in the bottom part, add the Audience URL to the existing 2 URLs
In IIS, change the Authentication to be Windows Integrated, Disable Anonymous
Make sure Group Policy has the Website in the IE Trusted Sites list
Restart K2 Service, Restart IIS

URL Rewrite:


However, there's a few times where some generated links are coming from the system that use the name of the server (dev-k2) and the port 81 instead of the "vanity" URL. Example:



What am I missing here?

Am I not supposed to change the Website and how it's referenced?

How are others doing this?

It's not too late for me to change how this is done. This is a small Single-server setup and this was just the Dev one.

I haven't built the Prod VM yet.


Best answer by Dslama 22 May 2019, 19:36

I updated some Environment Variables and did a Reboot. I'll see if this helps.

View original

3 replies

I updated some Environment Variables and did a Reboot. I'll see if this helps.

Hi Dslama

The best way to ensure the correct URL is being used everywhere in K2 is to rerun the K2 Setup Manager and going through the Configuration.

On the K2 Site Configuration screen, click the Binding button to select the URL that will be used for K2. This is obtained directly from IIS, so the binding needs to have been created in IIS first.



K2 will set up the site on http port 81 since port 80 is used by the Default Web Site. After installation you could change the hostname on the site and change to port 80 and then rerun the setup manager which then will update all the configurations. I use to remove the http binding entierly instead.