when i type "domain.com" in google it shows me domain.com and domain.com/index.php. Is it ok? What should i do with it?
...because search engines regard every landing page seaparately. You have to optimize both, but preferably for different keywords, so they don't compete with each other.
use your .htaccess file on your host and redirect all index.php and domain.com etc . to www.domain.com Because Google sees these pages as being different, even though they're not. You can end up having PageRank spread between them, and even penalty of duplicate content ..even though technically YOU know its the same and only page. examples of single site pages considered as more than one by Google. domain.com www.domain.com index.php use your .htaccess and for a quick example, to redirect all domain.com to www.domain.com something like this: Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] rep-points for saving you time searching for that code! come on now.. push the rep points button. lol
Here are a couple of quotes from Google Webmaster Central regarding duplicate content. In my opinion, you need not take any action regarding the indexing of both versions of the page... "Let's put this to bed once and for all, folks: There's no such thing as a "duplicate content penalty." At least, not in the way most people mean when they say that. Duplicate content on a site is not grounds for action on that site unless it appears that the intent of the duplicate content is to be deceptive and manipulate search engine results. If your site suffers from duplicate content issues, and you don't follow the advice listed above, we do a good job of choosing a version of the content to show in our search results."
Tara, (and there's more than 2 versions of a page) But what he asked was why he was having both pages indexed. If you want to control which pages can be and cant be and which version you can use the redirect code to clear that up. That way you wont have 3 versions indexed such as .. Widgets domain.com blue widgets www.domain.com expert widgets domain.com/index.php really expert widgets www.domain.com/index.php another good reason is.. people will link back to whichever version of the domain. Thanks
Correct, there's no such thing as duplicate content penalty, but that doesn't mean that you shouldn't properly redirect/nofollow your dupes to avoid pagerank leaking. And the last thing you want to do with your available pagerank is to pass it on to your duplicates.
OK, thats an interesting topic I suppose. So anyone could tell what I should write in .htaccess file? PS. I have a links on my subpages both to domain.com and index.php. Is it ok?
There may not be a "penalty," but duplicate content can cause pages which are duplicated to rank poorly. Excessive amounts of duplicate content can cause the entire site to rank poorly. While not a penalty, it sure can feel like one if you go from top ten rankings to ranking around 950. As the other posters indicated, it is best to use a 301 redirect on /index.php and point it to your top level domain. This is especially true /index.php has a different PR then your homepage.
Its always nice practice to redirect index.php to root directory as later on, many of your links will be pointing to / and many to /index.php which is not a very ideal situation
Can anyone write what should be in .htaccess file to make index.php redirect to domain? And it is really bad if I have linking both to index.php and domain on my website? Should I link only to www.mydomain.com on my subpages?
Yes, only link to your top level domain as being your "home." Also considering using a 301 redirect so that www or non www is consistently used throughout your site. The code to redirect /index.php to your homepage is below. But make sure you change the domain to yours. RewriteEngine On RewriteCond %{THE_REQUEST} ^.*/index.php RewriteRule ^(.*)index.php$ http://www.YOURDOMAINHERE.com/$1 [R=301,L] Code (markup): Good luck