In Magento, you can change the URL of a shop by making updates to the configuration settings for the store. Here are the steps to change the URL of a shop:
Log into the Magento admin panel.
Go to System > Configuration.
In the left sidebar, navigate to the store view for which you want to change the URL.
Under the Web tab, expand the Base URLs and Base URLs (Secure) sections.
In the fields labeled “Base URL” and “Base Link URL,” update the URLs to reflect the new URL for your shop.
Click the “Save Config” button to save your changes.
Clear the cache if necessary by going to System > Cache Management > Select all > Select “Refresh” from the actions dropdown and click on “Submit”
Check your frontend and backend to ensure everything is working as expected.
Note: If you’re using a custom URL structure, you may also need to update the URL keys for categories and products in your store.
Also, if you are using a custom URL for your shop, you should update the DNS settings for your domain to point to the new URL.
Also, if you’re using Magento 2, you should check the documentation for more details on how to change the shop URL.