I want bots to index mydomain.com I dont want bots to index www.domain.com what can I do in robots.txt to have bots perform that???
I already tried but it doesnt work for some reason you can see all my configs at this forum http://ubuntuforums.org/showthread.php?t=884559 please advise how to fix
Try... DirectoryIndex index.php <FilesMatch .\.php> ForceType application/x-httpd-php </FilesMatch> Options -MultiViews -Indexes +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\. RewriteRule (.*) http://%{HTTP_HOST}/$1 [R=301,L] RewriteRule ^adser|ref|product\.php - [L] RewriteCond $1 !(\.css)|(\.js)|(\.ico)|(\.swf)|(\.jpg)|(\.png)|(\.gif)|(^widgets.*)$ [NC] RewriteRule ^(.*)$ index.php [QSA,NC,L] Code (markup):
problem solved it should look like this: DirectoryIndex index.php <FilesMatch .\.php> ForceType application/x-httpd-php </FilesMatch> Options -MultiViews -Indexes +FollowSymlinks RewriteEngine On RewriteBase / [COLOR="Red"]RewriteCond %{HTTP_HOST} ^www.example.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [R=301,L][/COLOR] RewriteRule ^adser|ref|product\.php - [L] RewriteCond $1 !(\.css)|(\.js)|(\.ico)|(\.swf)|(\.jpg)|(\.png)|(\.gif)|(^widgets.*)$ [NC] RewriteRule ^(.*)$ index.php [QSA,NC,L] Code (markup): and it WORKS! thanks for helping me out - I would never guess!
you can set in google webmaster tools. Gollow the folling steps: 1. logine google webmaster tools 2. Go to tools 3. that click on "Set preferred domain" Here you can set.