Forum Moderators: phranque
I have one question to ask. I have a website with the protocol being [mysite.com...] for my main page. But i use [mysite.com...] for my sub pages. I link to these pages using a direct link such as [mysite.com...] instead of page1( I mean in the source code)
I noticed the issue of 301 redirect and tried putting it to change my domain from http:// version to [www...] version. I did a rewrite rule in the htaccess yesterday.
SO now do i change every link to the subpages like page1.html using [www...] version or do i continue with the http:// version? Will it affect my ranking? I mean those pages are indexed well and have a pagerank on it. If i link now to those subpages using the [www...] version, will my ranking be dropping?
Or instead should i just forget the 301 redirect issue? And do nothing now? Instead some are linking to my main page with [mysite.com....] So is it better to use the 301? If i do it, what about my sub-pages?
BTW, i am using modrewrite on sub pages like page1 to change php pages to something like [mydomain.com...] SO when i did the 301 redirect, it did not change from [mydomain.com...] to [mydoamin.com...]
Sorry for the confusion, really don't know how to describe my question.
Do not use both domain name variants. This can confuse search engines and cause them to split your pages' rankings across two domains, invoking the so-called 'duplicate-content penalty.' Instead of relying on the search engines' algorthms to sort out your correct domain name, take control and enforce the use of the one you prefer, and only that one.
www.example.com and example.com are not 'the same thing' -- They can be two completely-different sites. Each will be ranked by search engines based on its own incoming links and other factors, and then a 'clean-up' step is needed to figure out that they are really the same thing and 'merge' the ranking data. If this clean-up step is skipped due to time constraints or if it is done incorrectly, then your site suffers.
Technically, www.example.com is a subdomain of example.com.
If your site has been on-line for a long time and you have many links from other sites, then I suggest that you carefully analyze these incoming links, and use the domain name variant that has the majority of high-pagerank links. If you have a DMOZ listing and a Yahoo directory listing pointing to the domain variant that you don't like, then I suggest you change what you like. :) Count up all the links to evaluate link-popularity, evaluate the Google PageRank, and use that information to decide.
The best approach when setting up a new site is to pick the www or non-www domain, and then stick to it without fail, while 301-redirecting the other domain variant to the one you prefer. If done on a new site, the redirect prevents almost all links to the wrong domain variant, since the other webmaster will be immediately redirected if he/she uses the wrong domain variant.
This topic is really more SEO-related, since it is independent of the server or of how you implement the redirects. You may find more/better advice in the SEO-related forums.
Jim