Fixed the auto redirect with custom hostname workflow