Updated on Mar 13, 2019
Rebranding or changing the goods you sell may lead to a need for a change in the domain name of your Store. In this Tutorial, we will help you reconfigure your Magento 2 Store to open via a new domain.
Before you continue, make sure your new domain is properly configured and pointed to the servers of the hosting provider on which your current Magento 2 installation resides.
Now you will need to login to the admin area of your Magento 2 website and navigate to the Stores -> Configuration section from the main admin panel.
Go to the General -> Web tab from the navigation menu on the left and expand the Base URL section.
If your current domain is example.com and you wish to change your Magento 2 to be accessible via your new domain example22.com you will need to make the change in the URL here. You will also need to expand the Base URL (Secure) section and make the same change on the URL.
Once you are ready, hit the Save Config button at the top right corner of the page to apply the changes and make Magento 2 open via your new domain.