added preferred domain redirect functionality