fix redirect loop when viewing a domain that doesn't exist