After applying latest update 25 the host names are not working correctly


I updated the site from update 22 to 25.

My Visual Studio is configured to run the site on localhost:40351. When I run it then all the URL links to the other site's pages are not rendered with localhost host name but with different host name ( The web site configuration in CMS / Admin / Manage Websites is following:

  • In the General section the URL is http://localhost:40351/
  • In the Host Names section I have configured 2 host names:
    • (with en language)
    • localhost:40351 (with en language)

See the screenshots for better understanding: Rendered URL, Site Configuration.

Before the update the behavior was correct, i.e. on localhost all URLs was with localhost host name and on all URLs was with host name.

BTW why it not possible to insert images directly into the post???...

Aug 05, 2014 14:24


The idea with host names is to be able to have different hosts for different languages. So it is not recommended to have same language mapped for different hosts (actually it should probably throw an exception when doing so).

With that said, try to change the order of the hosts in the host list in admin mode (yes I know it requires delete and add since there is no sorting functinality in the list....)

Aug 05, 2014 15:52

I tried this too with the latest version and can not re-produce the issue.

I have following in the site config

  • * (host) - language en
  • - language en
  • localhost:40010 - language en

And in that order (didn't bother to change the order).

I have a site setup in IIS using the host and the VS IIS Express uses the localhost address

The host doesn't switch or go wrong on either sites.

I'm using in the code SiteDefinition.Current.StartPage vs Contentreference.StartPage to get the start page but in debugger I see both return the same id for start page so I guess the cause can't be that either.

Edited, Aug 05, 2014 17:15

The star '*' host name do the fix! So with the update 22 the sites works correctly, without the star host name. But with the update 25 you have to provide also the star host name to get the sites working properly. Seems something has changed in EPiServer code.

@Johan: we use the mapping of two sites for one language in the scenario, where developers are running the site on localhost on developer's machines, but testers use the deployed (published) site on the test server. But all sites share the same database.

Aug 06, 2014 8:04


Glad it sorted out for you. Yes the update contains a bug fix for which caused what you see.

Aug 06, 2014 8:17

Just for completeness ;) the bug is this one.

Aug 06, 2014 8:39

Thanks for the answer Antti Alasvuo

Just to clarify, the configuration is under CMS>>Admin>>Config>>Manage Websites

I've added the following Host Name entries in the Website (in that order)

Host Name - *
Culture - en-GB

Host Name -
Culture - en-GB

Host Name -
Culture - en-GB

Both dev and uat render their native urls correctly.

Aug 07, 2014 13:05

As an additional info related to '*' host name needed in site settings, I'd like to mention that one of our teams had issues with search autocomplete not returning any results stored with statistics (only those configured with Find optimizations for autocomplete in CMS), and when we have checked site settings '*' was missing.

After adding such host name autocomplete started to work, so it seems that when tracking is used to collect statistics during search and you don't have star '*' host name they are stored with blank site ID (our team received such information from EPiServer support).

Aug 08, 2014 14:52
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.