How to redirect website to the new address by using htaccess file?

The best way to redirect your website to the new address is by using redirection 301. It is the most efficient and Search Engine friendly method for website redirection. It easy to implement and it should preserve search engine rankings for your website. The code 301 we can interpreted as “moved permanently.”

Below the code that you should enter to your . htaccess file:

RewriteEngine on
RewriteRule (.*) http://www.newurl.com/ [R=301,L]