How to redirect your whole website using 301 redirect within the .htaccess file

13 sec read

In your Document root open the .htaccess file if present otherwise create a .htaccess file

Once the file is open edit the contents of the file and add the following code to it

Redirect 301 /

Replace the url with your url where you want your website to be redirected to.

Upload the .htaccess file and test, the redirection should work

Last Updated On March 22, 2018

Leave a Reply

Notify of