Properly handle cookies that specify sub-domain where the URL contains the top-level domain.