I'm trying to have the "www" subdomain automatically removed from my URLs. I haven't been able to get any of the mod_rewrite functionality to work (Shared hosting is very buggy about that).
I had thought of an alternative way of removing the prefix, but I couldn't find anything on the net about it. What if you pointed the www CNAME to "yourdomain.com"? Does anybody know if Google would handle that correctly?
[edited by: Webwork at 10:17 pm (utc) on June 3, 2007]
[edit reason] Charter [webmasterworld.com] [/edit]
I assume that what you mean is that when a user types www.example.com into the URL bar and hit return, it will be changed to example.com.
Assuming that is what you mean, the ONLY way to accomplish this is with a rewrite. And the only way to accomplish this is with a web server. There's nothing you can do with DNS to accomplish this.
User's browser sends a GET to a web server. Web server sends back a "301, moved permanently" to the browser. Browser updates the URL bar and sends a new request.
Note, however, that I said *a* web server. It doesn't have to be the same web server that you serve your site with.
Many DNS providers offer a "redirect" service. This is where the confusion comes in, and causes the erroneous notion that DNS has some redirect capability - it doesn't. The DNS provider has a web server set-up specifically to do redirects.
So, see if your DNS provider (most often your registrar) offers this. Since this is not actually a DNS feature, but an additional service offered as a convenience by the DNS provider, it's hard to give exact advice on how to do this, since the implementation varies from provider to provider.
[edited by: Webwork at 10:44 am (utc) on June 5, 2007]
[edit reason] Charter [webmasterworld.com] [/edit]