I am using ASP.NET 2.0 C#. I want to redirect all request for my web app with \"www\" to without \"www\"
www.example.com to example.com
Or
example.co
In order to answer this question, we must first recall the definition of WWW:
World Wide Web: n. Abbr. WWW
Succinctly, use of the www subdomain is redundant and time consuming to communicate. The internet, media, and society are all better off without it.
Using the links at the top of the page, you may view recently validated domains as well as submit domains for real-time validation.
Apache Webserver:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Windows Server/IIS:
There is no way.
You can use Url Rewriter from Code Plex. With the same syntax.
RewriteCond %{HTTP_HOST} !^(www).*$ [NC]
RewriteRule ^(.*)$ http://www.%1$1 [R=301]
Source