For configure with a new domain, you can follow either of the two solutions:
If you are able to log into backend, you can easily modify the base URLs of the site via:
System -> Configuration -> Web (Under the General section) -> Unsecure
There change the Field "Base URL" to the new domain.
System -> Configuration -> Web (Under the General section) -> Secure
Here, the "Base URL" field should either match the site's domain or, if you have purchased a Private SSL certificate for the site, here you should type the https form of the URL of your store.
Solution 2 :
If you do not have access to the backend anymore, you need to modify the URL within the database.
Go to the table: core_config_data and update below two records:
The last thing you need to do is clear the cache. The cache folder is located in your root directory > /var/cache. To clear the cache, delete the folder and create it again.
Please accept my solution if you satisfied