Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Steve Milligan 11 posts 77 karma points
    May 27, 2019 @ 11:59
    Steve Milligan

    Courier with Culture and Hostnames


    Is there a way of ensuring that the Culture and Hostnames settings do not get couriered from one environment to another?

    We have an issue that, when Couriering home nodes from staging to live, Courier is adding the staging mappings to the live Culture and Hostnames settings. It doesn't overwrite, it appends.

    Umbraco version is 7.10.5 Courier version is 3.1.6

    Thanks in Advance


  • Yakov Lebski 488 posts 1938 karma points
    Jun 19, 2019 @ 20:45
    Yakov Lebski

    Hi, the solution is SiteDomainHelper, you should define both domains on staging and live environment. Your live environment is a copy of your staging, you shouldn't modify it.

    In startup, OnApplicationStarting

       AddDomain("www", ",");
                        AddDomain("staging", ",");
     private static void AddDomain(string key, string domains)
                if (!string.IsNullOrEmpty(domains))
                    SiteDomainHelper.AddSite(key, domains.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries));

    In this situation, Umbraco will show only domain that appears in each group

Please Sign in or register to post replies

Write your reply to: