updated initializing snippet with setting custom domains