Business help and advice forum for starting and growing small businesses - Teneric Business Forums
Login Register FAQ Search Today's Posts Mark Forums Read
Search Engine Optimisation Forum Search engine optimisation (SEO) forum to show you how to set up your website so that it will rank higher

Reply
 
LinkBack Thread Tools
(#1)
Old
LesliedeWinter Offline
Business Planning
 
Posts: 3
Join Date: Apr 2008
.htaccess redirect to "www.blahblahblah.com" - 02-04-2008, 09:12 AM

Hi there, folks!

Just been reading Peter's TotalSEO How to Dominate the Search Engines ebook.

There's a part in there that says this:
Believe it or not, domain.com and www.domain.com are TWO different websites.
Some search engines have difficulty in realizing this. But there is a solution. For unix based customers add in the following into your .htaccess file (if you don’t have one just create one in your root directory)

RewriteCond %{HTTP_HOST} ^domain\.co.uk [NC]
RewriteRule ^(.*)$ http://www.domain.co.uk/$1 [L,R=301]

Replacing “domain” with your domain of course. This will change the URL for anyone typing in domain.com to www.domain.com – try it out, type in domain.com for your website and see what happens. If it is still domain.com then upload the .htaccess as shown above.

(Peter I hope you don't mind me quoting this passage at length. If you do, my aplogies and I'll remove this post immediately)

It doesn't seem to work.

I thought the forward slash in the RewriteCond line was maybe the problem, but still no good when removed.

Then I thought that maybe it's because the domain I'm using is an add-on domain.

Any ideas?

Leslie

------------------

More details in case that wasn't clear:

* My primary domain is http://www.abcdefg.com (not really, but let's pretend).

* My add-on domain is hijklmn.com

(and to my hosting account it is, therefore, http://www.abcdefg.hijklmn.com but to the outside world it's just http://hijklmn.com)

* When I type in just... hijklmn.com, I get http://hijklmn.com

Perhaps I've misunderstood, but I thought that the .htaccess code above was supposed to call forth http://www.hijklmn.com when someone types in just hijklmn.com

It's not doing so.

So either I've misunderstood. Or the code is wrong. Or there's something weird going on because it's an add-on domain. Or something else that I can't imagine.

Any help would be GREATLY appreciated!

Thanks!
Reply With Quote

(#2)
Old
fisicx's Avatar
fisicx Offline
CEO
 
Posts: 1,673
Join Date: Mar 2006
Re: .htaccess redirect to "www.blahblahblah.com" - 02-04-2008, 09:30 AM

You are using the wrong .htaccess code.

Try this: http://www.webconfs.com/how-to-redirect-a-webpage.php

Question. Why are you doing this, why not just have two websites? Using the redirect will effectively remove the addon domain from the SERPs.


Effective Web Design - It's not that difficult if you follow the rules.
Reply With Quote
(#3)
Old
TWD-Tony's Avatar
TWD-Tony Offline
Moderator
 
Posts: 765
Join Date: Apr 2005
Location: Manchester, UK
Re: .htaccess redirect to "www.blahblahblah.com" - 02-04-2008, 10:13 AM

Quote:
More details in case that wasn't clear:

* My primary domain is http://www.abcdefg.com (not really, but let's pretend).

* My add-on domain is hijklmn.com

(and to my hosting account it is, therefore, http://www.abcdefg.hijklmn.com but to the outside world it's just http://hijklmn.com)

* When I type in just... hijklmn.com, I get http://hijklmn.com

Perhaps I've misunderstood, but I thought that the .htaccess code above was supposed to call forth http://www.hijklmn.com when someone types in just hijklmn.com

It's not doing so.

So either I've misunderstood. Or the code is wrong. Or there's something weird going on because it's an add-on domain. Or something else that I can't imagine.

Any help would be GREATLY appreciated!

Thanks!
Are you sure that is the right way round? Also is hijklmn an ADD-ON domain or a SUB-DOMAIN?

If it is a sub-domain then you should see a folder call /hijklmn when you log into abcdefg.com via FTP.

It's just that there are different ways of handling this depending on how it is setup.


Total Web Development - Business Website Solutions.
Feel free to contact me with any website issues.
Reply With Quote
(#4)
Old
LesliedeWinter Offline
Business Planning
 
Posts: 3
Join Date: Apr 2008
Re: .htaccess redirect to "www.blahblahblah.com" - 03-04-2008, 05:33 AM

Hi there

Thanks so much fisicx & Tony for your responses!

--------------

@Tony: You're quite right; I made a blunder with the examples

Also, the nomenclature is somewhat confusing for me...

...when I log on to www.abcdefg.com via FTP, then, yes, there is a sub-directory called "hijklmn"...

but...

... in order to generate that folder/sub-directory via cpanel, I used the "Add-on Domains" option.

So I don't actually know if it's a subdomain or an add-on domain based on these descriptions I'm a little confused, I'm afraid.

The following comes from my ISP's knowledgebase. I don't know if it helps clarify:
Addon domains are handled like subdomains as far as the server is concerned, but to the outside world they are separate domains.
--------

@fisicx: The reason I'm doing it is based on advice in a SEO book written by Peter Hale, from which the entire passage I quoted above came. That paragraph seems to imply that it's somehow better to only have the SEs recognise a single URL for your site and therefore consistently index it on the www-URL regardless of how other sites link to yours.

Is this not correct in some way? have I misunderstood? Is it misguided advice?

---------------------

The passage says that the "solution" is an .htaccess redirect, but it doesn't clearly outline what the problem is and why it's a problem in the first place!

And while I'm aware that I can't know the details of everything I'm doing all the time (the car analogy is a common one on this point, i.e. I don't know the finer details of what's going on internally; all I really need to know is how to drive the thing), I'm not a big fan of mindlessly following directions when I don't understand at least the principles behind them or why it's good to follow them.

So...

Why is it good to do this kind of redirect, ensuring that the site only shows up with "www" regardless of what folks type in? Is it for the reasons I propounded above or for some other reason?

Leslie
Reply With Quote
(#5)
Old
LesliedeWinter Offline
Business Planning
 
Posts: 3
Join Date: Apr 2008
Re: .htaccess redirect to "www.blahblahblah.com" - 03-04-2008, 05:40 AM

@fisicx: thanks for the list of different redirects, btw! They're GREAT!

And the code on that page worked like a charm. I tested it, but as I mentioned in the previous post from a moment ago, I don't know why (if even IF!) it's good to do that.

But thank you very, very much for the link. Greatly appreciated!

Leslie
Reply With Quote
(#6)
Old
OldWelshGuy Offline
Business Startup
 
Posts: 21
Join Date: Jun 2008
Re: .htaccess redirect to "www.blahblahblah.com" - 12-06-2008, 08:33 PM

.HTACCESS is not an area to mess with unless you know what you are doing. For the record domain.com/index.htm
domain.com/index.html
domain.com/index.php
etc are ALL different pages in the eyes of the search engines.
Reply With Quote

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which front page link to use? mikemac Search Engine Optimisation Forum 43 15-05-2007 05:37 PM



Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0 ©2007, Crawlability, Inc.