current domain alias

Alexander Toups asked on September 18, 2020 09:36

How can I get the current domain alias for the current site?

Correct Answer

David te Kloese answered on September 18, 2020 11:24

Not sure where you want to get it? Just view them in the browser? In code... from the Database?

As a site admin you can view them in the Sites Application when you click on the pencil icon and navigate to the Domain aliases tab:

Image Text

In code you can retrieve a list of all aliases for the current site:

SiteDomainAliasInfoProvider.GetDomainAliases(SiteContext.CurrentSiteID)

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.