But on Saturday, Nov 18th, we had a crisis. If the site could be found on Google, it worked. But, from Yahoo, it didn't allow users to log in. The site wasn't changed and we knew that the problem had to be centered in either Yahoo, Google, or our website host. After hours of searching, we realized that when the site was entered using www.dummyname.com, from Google, it worked. But Yahoo's link was only dummyname.com, without the www, and this didn't work. We added a Javascript onload function to redirect dummyname.com to www.dummyname.com, and this kept us going.
After that, the site dropped from #1 in Yahoo, to #11, and then it couldn't be found. Our crisis was back and this had to be resolved. After lots of searching, we found that this often happens because the two URL's are actually different! Two things needed to be done to resolve this:
- Using Google's Webmaster Tools, we set the Preferred domain.
- In our site's home directory on our host, we added a 301 permanant redirect.
Next we addressed Yahoo. Because Yahoo listed us without the "www" and we wanted that to be our preferred site, we needed to redirect all non-www views to www views. This is done by creating a file called " .htaccess " (no file name, just a filetype) in your home directory on your website host. This directory is where your home or index page is located. Inside the .htaccess file, add the following:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^YourSitesName.com [NC]
RewriteRule ^(.*)$ http://www.YourSitesName.com/$1 [L,R=301]
Replace "YourSitesName" with yours, and do not have any blank lines.
Now, whenever your site is accessed, you will be permanently redirected to the "www" site if necessary. Because we used the .htaccess file implementation of this, every request to your site will do this. Thus, the change goes in immediately.
Since we only made these changes 2 days ago, we are still waiting for everything to take effect. However, we are now back on page 1 of Yahoo, and more often #1 on Google.
Hope this helps.
i believe, you cannot create .httaccess file for Blogspot blogs. How can I solve this problem on Yahoo? Yahoo indexed my www.marhgil.blogspot.com instead of marhgil.blogspot.com.
ReplyDeleteDon't know answer yet - but will get back 2 u.
ReplyDelete