Forum Moderators: goodroi

Message Too Old, No Replies

www, version not indexed, why?

         

biztips

8:37 pm on Jul 8, 2009 (gmt 0)

10+ Year Member



I have a fairly new site, example.com.

I use Firefox's rankchecker to check site rankings - and it doesn't find my WP site at http://www.example.com, but DOES find the version without the www in it (http://example.com.)

Why is that? I don't understand canonical URLs and .htaccess and all that, but had a "techie" friend supposedly fix it - no luck.

I would love two things - first, somebody to tell me what's wrong and how to fix it - and second, some easy-to-understand explanation of how to prevent this from happening again!

Thank you, hope this is the right place to post this -

Diana

[edited by: goodroi at 10:08 pm (utc) on July 8, 2009]
[edit reason] Please no urls [/edit]

goodroi

10:29 pm on Jul 8, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



The basic idea of the canonical url issue is that http://www.example.com and http://example.com are technically two different urls and can potentially show different content (yea i know 99% of sites always show the same stuff). Search engines can possibly index both urls causing duplicate content issues and dilution of link popularity which are both bad for you. To be safe it is advised to redirect one of those url versions to the other url.

Your friend did fix it for you. It seems that your friend added a 302 redirect. Whenever someone tries to visit http://www.example.com they are automatically redirected to http://example.com. That is a good thing. It helps to avoid those potential search engine headaches.

Whenever a search engine visits your site they will always see http://example.com because of the redirect. This is why your site will show up in search results as http://example.com and not as http://www.example.com.

You can improve on your friend's fix. Your friend used a 302 redirect which is intended for temporary situations. Ideally your friend should have used a 301 redirect which is for permanent situations and redirects link popularity in a better way.

biztips

11:21 am on Jul 9, 2009 (gmt 0)

10+ Year Member



Thank you, that eases my mind - the bottom line of course is that the search engines AND site visitors can find the site easily!

How do I do the 301 redirect - is it in the .htaccess file?

goodroi

12:09 pm on Jul 9, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You would adjust your htaccess file for a 301 redirect.

phranque

8:03 am on Jul 14, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



if you can find the relevant RewriteRule with the redirect or R flag [httpd.apache.org] in brackets, then change the 'R' to 'R=301' will specify a Moved Permanently response instead of the default 302 code which is considered "temporary".