Steps to prevent the same are :

1) Edit your .htaccess file (found in the root directory of your website folder). If the file doesn’t exist, please create a new file and name it as .htaccess

2) Put these 2 rules at the end of the file :

RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*)$1 [QSA,R=301,L]


You can put https in place of http if your website works on https.


Done !!

Was this answer helpful? 0 Users Found This Useful (0 Votes)