How to trim URL to root domain?

Roger that!

So, Peter, does that mean you will be adding a KM Action to get the root domain? :wink:

As you have seen, it is very hard to do. There are many StackOverflow posts trying to figure this out, and I haven't seen any that really does the job. @Tom's solution is the best, most complete I have seen.