First of all, you need to know about your site have which types of server. Mostly these types of server use a htaccess file: 1- Linux, 2- Apache If your hosting account uses one of these types of the server then you can copy below code into your htaccess file by SEO companies.
Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^ example[dot]com [NC] RewriteRule ^(.*)$ www[dot]example[dot]com/$1 [L,R=301] RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . www[dot]example[dot]com%1%2[R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(([^/]+/)*)index\.html\ HTTP/ RewriteRule index\.html$ www[dot]example[dot]com%1 [R=301,L]\
Note: In red highlights, you need to replace example.com with your domain name and in green highlights, you need to replace with your .html or .php index page. Keep in mind do not write just index, write extension too.
After the copy, this code with your htaccess old code, Save it and upload to your root folder where your site has the index page. Hope it will solve.
|