Anyone got any info on redirecting from www.DOMAIN.com to DOMAIN.com (without the www) I need info for both IIS and Apache. This is kinda desperate as I have a whole bunch of sites I fear could be smaked with a dupo content penalty...
If you have isapi_rewrite on your Windows server, this will work (add it to the httpd.ini file): RewriteCond Host: ^example\.com RewriteRule (.*) http\://www\.example\.com$1 [I,RP] This will 301 redirect http://example.com to http://www.example.com
Removing the www for your domain http://wiki.dreamhost.com/index.php/Removing_the_%22www%22_from_your_domain Requiring www for your domain http://wiki.dreamhost.com/index.php/Requiring_%22www%22_for_your_web_site From dreamhost's wiki; doesn't only apply to dreamhost, and is well explained.
Thank you very much guys! Is isapi_rewrite goign to have to be there to do anything like that on IIS (This is for client sites too and I'm no sure what they have installed on all of their servers - They'res a few)...
The EASY way in apache is in the virtual host section of your apache configuration file. E.G. my httpd.conf contains: <VirtualHost *> ServerAdmin ziandra@ziandra.net ServerName ziandra.net Redirect / http://www.ziandra.net/ </VirtualHost> <VirtualHost *> ServerAdmin ziandra@ziandra.net ServerName www.ziandra.net DocumentRoot /home/www/ziandra.net/htdocs ... rest of my config Code (markup): You may have to use mod_rewrite if it is compiled into the server and you do not have access to the configuration files, either directly or through cpanel. Using mod_rewrite is a little tricky to handle all the boundary conditions. Note: if any of your sites are submitted to directories, it may pay you to redirect the non www to your www site to avoid confusion. Some directories require their editors to list the www version if it works and there has been a fair amount of talk about which search engines "do the right thing". Safest thing to do is to pick www.domain.tld as your main address and redirect domain.tld to it.
You can do this through IIS configuration. * in your DNS map domain.com to the same IP address as www .domain.com * create a new website (same IP address) and type domain.com in the Host edit box * check Properties > Home Directory > A redirection to a URL and type www .domain.com in the URL edit box That's it. All requests to domain.com will be redirected to www .domain.com. J.D.