I have a .shop domain and adding email address in the backend (user info) i get the following errors:

  • ... is not a valid hostname for email address
  • ... appears to be a DNS hostname but cannot match TLD against known list
  • ... appears to be a local network name but local network names are not allowed

exactly the same issue as described here: https://github.com/magento/magento2/issues/4547

Is there a way to turn-off the email validation in magento 2.1?


open SSH and run the command find . -name Hostname.php inside the root directory

you will get 4 location of files


Open the file at this location ./vendor/magento/zendframework1/library/Zend/Validate/Hostname.php

and add your desired new tld as per the below image.

enter image description here

Once you edit the file you can check other 3 files also get the code updated in them. now you can save the new tlds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.