I can't find the write code that I will add to my .htaccess file. I know seo experts in this forum can help me with this. How can I permanently redirect all pages of my site from the url with www to with no www for examample www.mydomain.com - domain.com , www.domain.com/page.html - domain.com/page.html thanks in advance
I never understood why people want to remove their www. from the URL - then again I don't know why I want to add it. lol I like it. Anywho, here's the code to do the exact opposite; add the www. Alter it a little and test out on your page. I hope this helps as a starting point. RewriteCond %{HTTP_HOST} !^www.munnyness.com$ RewriteRule ^(.*)$ http://www.munnyness.com/$1
PionyIto, just put the two lines of rules/code that mbreeze supplied you with into your root .htaccess file, and it'll do exactly what you've asked Hope this clears it up Chuckun
RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.com RewriteRule (.*) http://www.domain.com/$1 [R=301,L] Code (markup): That should do the trick.
Put this code on top line of your .htaccess file RewriteEngine On RewriteCond %{HTTP_HOST} ^www.changeitwithyourdomainname\.com$ [NC] RewriteRule ^(.*)$ http://changeitwithyourdomainname.com/$1 [L,R=301] Code (markup): This will redirect www to non-www
Contact your domain hoster. Many provide this option as part of their services. I use GoDaddy and when I set up my domain with them I configured "www" to always point to the non-"www" domain name which is the domain name I use.