Welcome to WebmasterWorld Guest from 54.145.44.134

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

client wishing to redirect search engines

is this code right. is it cloaking

     

nippi

10:58 am on Jul 5, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Client has wishes to change domains from a .com.au to a .com.

He doesn't wish to 301 the whole domain, he just wants to 301 the domain as far as search engines are concerned and run the site on the two domains.

Will this work?

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} .*(msn|live|altavista|excite|ask|aol|google|mail|bing|yahoo).*$ [NC]
RewriteRule .* http://www.example.com [R,L]
</IfModule>

Yes, I am aware its been used as malware, in this case its a "legitamate usage.

[edited by: phranque at 10:51 pm (utc) on Jul 5, 2013]
[edit reason] exemplified hostname [/edit]

lucy24

8:48 pm on Jul 5, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



#1 What's with IfModule? You've either got mod_rewrite or you haven't. (If you haven't, change hosts yesterday.)

#2 The quoted RewriteRule doesn't create a 301, only a 302.

#3 Since a redirect-- unlike a rewrite-- is visible to the naked eye, "cloaking" may not be the right word. To do it as a concealed rewrite you're talking proxies.

#4 Why bother with any of this stuff? Set up one domain as a mirror of the other. See the various search engines' wmt for information on internationalization and geotargeting. It is perfectly OK to have the same content on different URLs so long as it's clear that you have non-overlapping audiences, for example Australians and non-Australians.

phranque

1:16 am on Jul 6, 2013 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



a redirect isn't really cloaking and in this case the redirect is aimed at the referred visitor and not the bot.

Cloaking - Webmaster Tools Help:
http://support.google.com/webmasters/answer/66355 [support.google.com]

however, your method could be viewed by google as Sneaky redirects:
http://support.google.com/webmasters/answer/2721217 [support.google.com]


.*(msn|live|altavista|excite|ask|aol|google|mail|bing|yahoo).*$

there is a lot of unnecessary backtracking going on there.
this would work just as well for your purposes, if you end up using this:
(msn|live|altavista|excite|ask|aol|google|mail|bing|yahoo)


in this case its a "legitamate usage.

perhaps if you described the intention/purpose of your redirect you could be shown a better method.

nippi

2:13 pm on Jul 6, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The reason to do it, is to have the sites live, but pass are link value from the previous to the old version of the site.

nippi

2:14 pm on Jul 6, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So in the end?

I am not sure where this ended up.

a. I want to do a conditional 301.
b. I only want to target search engines not people.
c. Its important link value goes from the old to the new domain, though many people will still use the old domain.

Thats why i am doing it this way, and not doing an actual 301

phranque

6:31 pm on Jul 6, 2013 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I only want to target search engines not people.

your proposed ruleset implies you want to redirect based on the Referer header.
do you really want to redirect based on the User-Agent (crawler identifier)?
in that case you are talking about cloaking and you should implement a different plan.

Its important link value goes from the old to the new domain, though many people will still use the old domain.

danger!
i would avoid anything that looks like an attempt to manipulate page rank or to show bots different responses than people.

lucy24

8:21 pm on Jul 6, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



RewriteCond %{HTTP_REFERER} .*(msn|live|altavista|excite|ask|aol|google|mail|bing|yahoo).*$ [NC]

Your fingers typed HTTP_REFERER but I think your brain meant HTTP_USER_AGENT.

It's still too general, though: in particular, it would include any and all googlebot spoofers. And there have got to be human browser add-ons that contain strings like "msn" or "aol".

Non-issue, though, because it isn't the right way to do what you're trying to do. Look up mirroring and geotargeting. You want to tell the search engines "Yes, these two domains are identical-- and they're supposed to be identical."

Edit for "D'oh!" moment:
One of the domain names is .au. The other isn't. The search engines crawl from the US. You don't need to look at UA at all; you can simply redirect by the first part of the visitor's IP.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month