5

This question is inspired by the root cause I learned about in this question, where it turned out that the order of URLs in the BaseUrls matters. If a site is set up as both http and https, then the https site should be listed first in the BaseUrls argument. Otherwise, Page Preview links to http sites, the site manager links to http sites, and XPM doesn't work well, because it loads mixed content.

So this leads me to conclude that maybe BaseUrls was meant for multiple URLs, not multiple protocols. Examples:

Much Weeping and gnashing of teeth:

Set-TtmWebsite -Id ExampleLiveSite -BaseUrls http://example.com, https://example.com

No weeping, but probably ¿unnecessary?:

Set-TtmWebsite -Id ExampleLiveSite -BaseUrls https://example.com, http://example.com

What BaseURLs was meant to do:

Set-TtmWebsite -Id ExampleLiveSite -BaseUrls https://example.com, https://sample.com

Question: Are these assumptions correct?

But we've also been doing something like the example below, where we create a test site for a Live site.

Set-TtmWebsite -Id ExampleLiveSite -BaseUrls https://example.com, https://example-test.com, https://sample.com, https://sample-test.com

Question: Given that the first site listed is what "Preview Page" points to, and it's what XPM points to, should we be listing the test site first?

Question: Are there any other best practices to follow, or at least not-so-great practices that we should avoid?

3

There are multiple use cases for specifying multiple Base URLs on a Website in Topology Manager:

  • DNS name vs IP address
  • DNS name vs “localhost”
  • Internal vs external DNS name
  • HTTPS vs HTTP
  • More (?)

The idea is that all these different Base URLs are effectively aliases for the same website. Furthermore, the idea is that one of them (the first) acts as “primary”/preferred URL.

In case of HTTP & HTTPS: I guess you prefer people to use HTTPS and hence that one should be the primary (first) base URL. As a matter of fact, you may want to enforce use of HTTPS by using client redirects from HTTP to HTTPS. In that case, you don’t even have to specify the HTTP URL at all in Topology Manager.

I’m not sure about your use case of “a test site for a live site”. That sounds like two separate Websites to me, rather than multiple base URLs for the same Website.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.