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

No Comments

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 / http://yoursite.com/

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.

Last Updated On March 22, 2018

Related Articles

No results found

Leave a Reply

avatar
  Subscribe  
Notify of
Menu
Copy link