homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Domain Names
Forum Library, Charter, Moderators: buckworks & webwork

Domain Names Forum

CNAME Versus 301?
Do I *need* a 301 on my host if I have a CNAME at my registrar?

 5:28 pm on Feb 9, 2010 (gmt 0)

Earlier this morning I was reading [webmasterworld.com...] and it led me to think about my 301 (or lack thereof).

I searched and found an old thread at [webmasterworld.com...] but it appears to be closed for comments.

At my registrar, the A record is set up for mydomain.com, with CNAMES for www.mydomain.com and *.mydomain.com to mydomain.com ...with the hosting company set up as the name server (three DNS names).

At the host, I haven't set up any 301s in the .htaccess (all I have there, at the moment, is names for error files - 400, 401, etc.).

I'm certainly no biggie at writing 301 code, but I *might* be able to deduce the right thing from the previously mentioned thread. But first: do I *need* to?



 7:52 pm on Feb 9, 2010 (gmt 0)

These post should help you get a grip on what 2 do.


and if not here is a search that you can use to get it all



 12:31 am on Feb 11, 2010 (gmt 0)

Short answer - yes, the 301 is highly recommended. Mainly because search engines will have half as many pages to index, and may therefore be able to index your site more fully.


 12:52 am on Feb 11, 2010 (gmt 0)

Ok: thanks, @bwnbwn and @mcavic. I've picked up the code from the threads @bwnbwn cited. Surprise, surprise: I didn't botch it! 301 in place, and all's right with the world (so far...)

Now, I'll do the same for all my clients, just for the heck of it.


 1:09 am on Feb 11, 2010 (gmt 0)

CNAMES for www.mydomain.com and *.mydomain.com to mydomain.com

Unless you use a number of subdomains the latter (*.mydomain.com) should not be needed.

What it does is to make sure that if I type, eg.


...or something similar, that your web site at "domain.com" will be displayed at this address. I can think of only few reasons why this would be desired.

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