EPiServer – Changing hostname on single website

Re-add “*” to Hostname in EPiServer

Have you tried to delete websites in EPiServer then added a new one and not adding “*” as hostname?

In my case our code failed somewhere deep down, so it felt as the easiest solution to add the “*” directly in the DB

-- Print current sites and hostnames
select * from tblSystemBigTable
where [StoreName] = 'EPiServer.Web.SiteDefinition'
select * from tblBigTableReference
where ElementStoreName = 'EPiServer.Web.HostDefinition'--pkid = <from above>
select * from tblBigTable
where [StoreName] = 'EPiServer.Web.HostDefinition'
-- Add * as hostname for all sites, where language code is not set
update tblBigTable 
SET [String02] = '*'
where [StoreName] = 'EPiServer.Web.HostDefinition'
AND [String01] is null

The End.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: