Hi, I'd like to know how to set 301 redirects for all domains on a particular server running win2k3/iis6 so that all traffic to http://domain.com is redirected to http://www.domain.com. I found this solution but it doesn't appeal to me. I have ISAPI_Rewrite installed. Need advice
As far as i am aware you need to add a c-name in the DNS settings, not necesarily a 301 for this problem. Go to this page on the Microsoft site: http://www.microsoft.com/technet/archive/winntas/deploy/setting.mspx?mfr=true Hope it helps buddy.
Thanks notcon.seo, but won't that end up masking the domains (making two of each)? I'd really prefer to do it via ISAPI_Rewrite. I understand this would work: RewriteCond %{HTTP_HOST} ^yourdomain\.com RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=permanent,L] Code (markup): But I don't want to add an entry for each domain name... please help.
The issue you have is that you are trying to get a cannonical url (non www) to redirect to the main url (www), in the dns settings you add a cname alias, the cname is the cannonical name thus if a user types in your cannonical url your server automatically redirects to the www version, so the user and search engines has no real idea of the cannonical non www existence. Well thats my understanding any way
Yeah but I have ISAPI_Rewrite installed, & it says on their site that the syntax is very similar to mod_rewrite I tried this but it didn't work RewriteCond %{HTTP_HOST} ^yourdomain\.com RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=permanent,L] Code (markup):
in short yes, every domain name that you have hosted on your servers, if you want them to should have a cname alias associated with them, if you are using a control panel such as helm or others you should be able to set it up to do this for you when you add a domain. I just feel that isapi is not the most efficiant way of doing it, as the cname dns alias is for that very purpose.