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

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

Image Credits: Photo by Isis França on Unsplash.

More Similar Posts

No results found.