Open up the root folder of your project on the old domain and look for the file called. : .htaccess ( If you can’t find it just create one in your text editor)
Then just add the following snippet in there:
Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^OLDDOMAIN\.com$ [NC] RewriteRule ^(.*)$ http://NEWDOMAIN.com [R=301,L]