homepage Welcome to WebmasterWorld Guest from 54.211.157.103
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / WebmasterWorld / Domain Names
Forum Library, Charter, Moderators: buckworks & webwork

Domain Names Forum

    
Removing "www" using CNAMES
Is it possible to remove the www prefix using cnames
kitsune




msg:3357517
 9:59 pm on Jun 3, 2007 (gmt 0)

Hi all,

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]

 

netchicken1




msg:3357528
 10:28 pm on Jun 3, 2007 (gmt 0)

In the webmaster toolkit on Google sitemaps (I think) you can set how you want your site indexed, with www or not.

That might help...

jtara




msg:3358220
 5:20 pm on Jun 4, 2007 (gmt 0)

Define "remove".

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.

Roel




msg:3358506
 11:11 pm on Jun 4, 2007 (gmt 0)

I regularly ask my hosting company to disable the www-version of my site, only leaving the non-www version active (http://example.com instead of http://www.example.com)

[edited by: Webwork at 10:44 am (utc) on June 5, 2007]
[edit reason] Charter [webmasterworld.com] [/edit]

jtara




msg:3358534
 11:24 pm on Jun 4, 2007 (gmt 0)

I don't think it's a good idea to remove the www. Too many users expect it to be there, and will enter it on type-in.

Much better to do a redirect to your canonical domain name.

And, yes, I am in the minority who - like you - prefer the simpler "non-www" to www.

kitsune




msg:3370509
 1:08 am on Jun 18, 2007 (gmt 0)

Thanks everyone! After a whole lot of toiling with tech support, they finally got the Rewrite Engine working, so I've just had the "www." do a 301 redirect to the non-www.

I did log in and tell Google that I preferred no www... thanks again for the help!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Domain Names
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved