|Why does Google think my root page is non www?|
Is there an easy way to set up a 301 redirect for the inexperienced?
6 months ago my site sank into Goggles supplemental results. Now my site is getting spidered again and it appears in the index. However, it has been indexed as non www. Why does Google think my root page is non www? I hve not changed anything on my site
I still do not get any traffic as the non www of my site only has a PR2, where as the www version has a PR6.
My question is: I am not a programmer, I do not understand about mod-rewrites, or Htaccess, and I have no idea how to set up a 301 redirect. Is there an easy way to accomplish this?
It isn't always necessary for you to change anything on a site for changes to take place. In this case, somebody probably linked to your index page without the www, Google followed the link and indexed it.
There's a good current thread on redirecting non-www to www with .htaccess [webmasterworld.com] that should explain anything you have to know. There are always a lot of nuances with different server configurations, etc., so be sure to read the entire thread. If you have any problems the folks over there should be able to help you out.
my site had been on Google for a couple of years before it sank into the supplemental results. Its still a PR5 and has over 3,000 incoming links.
I donít understand how or why a few webmasters linking to my site using the non www version would cause this problem.
If I search for my site using "site:http://mysite.com", I find my index page with title and description
If I search using "site:http://www.mysite.com", I find my site but itís just the URL without title or description.
I have just started using Google sitemap to see if this will correct the problem. However I am not sure what is the best way to list my sites URLís and index page. Should I use absolute linking? For example:
|I donít understand how or why a few webmasters linking to my site using the non www version would cause this problem. |
Google thinks there are two separate sites with identical content, (www subdomain and the non-www domain). If the problem has been left to fester long enough, you could now have duplicates of every page on the the site listed in G. This is not good.
Added: Absolute linking could be helpful, and is probably the better choice. It at least tells the bots that the links are to the preferred canonical version. For your index/default use ht*p://www.mysite.com or with a trailing slash. Don't add /index.html or G could see that as yet another page.
>>> My question is: I am not a programmer, I do not understand about mod-rewrites, or Htaccess, and I have no idea how to set up a 301 redirect. Is there an easy way to accomplish this?
If I were you, I would contact my hosting company and ask them to do it. In case they want to charge for the service, I would pay if it was reasonable. If they can't do it, I would consider changing the hosting company.
Another tip: when you link to an index page, end the URL with a trailing / and don't include the actual index file filename in the link at all.
If your server allows PHP files you could try something like this. Place it at the top of your front page and it should redirect http://example.com to http://www.example.com without the need for updating the .htaccess. Note that you would have to ensure that all links on your site are absolute and link to the www URLs or else you would have to paste this at the top of all pages (could use an include file). Anyhow I'd recommend using the htaccess method, but since you asked...
$domain = $_SERVER[SERVER_NAME];
$domainWithSubdomain = $_SERVER[HTTP_HOST];
$subdomain = str_replace($domain,"",$domainWithSubdomain);
if($subdomain == "")
// Forward visitor to the URL with the subdomain