How to change your store URL in Magento 2
There may be times when you need to change the URL, or domain name, for your Magento website. For example, you may want to change your URL from the development URL or old domain.
On the Magento admin sidebar, tap Stores and choose Configuration. In the panel on the left, under Advanced, choose Admin and expand the Base URLs section.
See more here