How to redirect your website to a new domain/location in .htaccess

October 26, 2018

If you need to move domains and want to 301 redirect all old URLs to the new domain/location, use the following .htaccess code

Redirect 301 / http://your-new-domain.com/