Welcome to WebmasterWorld Guest from 54.144.126.195

Forum Moderators: buckworks & webwork

Message Too Old, No Replies

CNAME Versus 301?

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

     

albo

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

10+ Year Member



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?

bwnbwn

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

WebmasterWorld Senior Member bwnbwn is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



These post should help you get a grip on what 2 do.
[webmasterworld.com...]

[webmasterworld.com...]

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

[bing.com...]

mcavic

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

WebmasterWorld Senior Member 10+ Year Member



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.

albo

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

10+ Year Member



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.

claus

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

WebmasterWorld Senior Member 10+ Year Member



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.

i-just-hate-the-awful-web-site-at.domain.com

...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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month