Hola webmaster… since you are here I assume you are looking for a solutions to redirect duplicate looking and sounding pages on your website to a global format. In the next 3 minutes you are going to do exactly that. Read on…
By the way did you know search engines see www.domain.com , domain.com and domain.com/index.php as three separate pages. So when the search engine arrives on the site it get confused.
SE Bot: What the hell? Which one is the right URL? Ok let me pick one which ever i think is good.
What you should do? You need to 301 redirect all the versions to one global version.
Ok enough Rambling Mr Pattanaik, tell me how to do it.
Well yeah. I use the htaccess method in apache servers. Here is how to do it for your website using htaccess.
Step 1: Create an HTACCESS file. Open notepad save the file as .htaccess …thats it.
Step 2: Add this code to the file in editor.
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.yourdomain.com/$1 [R=301,L]
Step 3: Thats all. Upload the file to your root directory of the domain. Dont worry its not a virus or spam bot I am asking you to upload.
Now Share this post if you find it helpful.