reCAPTCHA with one Key on more than one domain name (on same account)

3,550 views
Skip to first unread message

dylan

unread,
Mar 4, 2010, 4:30:14 AM3/4/10
to reCAPTCHA
Dear

I have a domain with three different domainnames:
my-domain.de, my-domain.eu, mydomain.eu

The .eu domains are forwarded to the .de domain, there have no own
account or server place.

If I call my-domain.de reCAPTCHA does work well.
If I call my-domain.eu and mydomain.eu I get an error message:

"This reCAPTCHA key isn't authorized for the given domain. More info"

Is there a way to use reCAPTCHA with one Key on more than one
different domain names?
Or is there another way that it does work?

Paul Herring

unread,
Mar 4, 2010, 4:43:35 AM3/4/10
to reca...@googlegroups.com

Easiest solution is to get a global key:
http://wiki.recaptcha.net/index.php/Overview#Part_1:_Sign_Up

An alternative is to get individual keys for all domains, store them
somewhere, and dynamically change them depending on which website is
being used.

--
PJH

http://shabbleland.myminicity.com/env
http://www.chavgangs.com/register.php?referer=9375

dylan

unread,
Mar 4, 2010, 5:20:32 AM3/4/10
to reCAPTCHA
> Easiest solution is to get a global key:http://wiki.recaptcha.net/index.php/Overview#Part_1:_Sign_Up

I could not change the data of existing domains, right?
So I do a new global one, and it does work. Thanks.
For my info: Do I suspect correctly, that anyone can install my key
into his website, regardless of the domain names ..?

> An alternative is to get individual keys for all domains, store them
> somewhere, and dynamically change them depending on which website is
> being used.

I Can't do that, because it's only ONE DOMAIN. The other domains will
only be redirected.

It would be good (!?), if there be a way to enter more than one
private key behind each other, separated by commas, or somethink like
that?:

<script type="text/javascript" src="http://api.recaptcha.net/challenge?
k=4LbXmGs...9ZBBybs, 5LAXmFs...8ZBybs, 6LbXmGs...9ZCCybs, 6LAXmFs...
8ZaRss"></script>

That might be a way to use private keys?

Paul Herring

unread,
Mar 4, 2010, 5:31:19 AM3/4/10
to reca...@googlegroups.com
On Thu, Mar 4, 2010 at 10:20 AM, dylan <bodo...@gmx.net> wrote:
>> Easiest solution is to get a global key:http://wiki.recaptcha.net/index.php/Overview#Part_1:_Sign_Up
>
> I could not change the data of existing domains, right?
> So I do a new global one, and it does work. Thanks.
> For my info: Do I suspect correctly, that anyone can install my key
> into his website, regardless of the domain names ..?

A global key will work on *any* site, so yes.

>> An alternative is to get individual keys for all domains, store them
>> somewhere, and dynamically change them depending on which website is
>> being used.
>
> I Can't do that, because it's only ONE DOMAIN. The other domains will
> only be redirected.

It would appear that the URL or some other server variable isn't
changing somehow, since reCAPTCHA is detecting the fact that it's not
on the domain it's expecting. Examine $_SERVER['HTTP_HOST'] and
$_SERVER['SERVER_NAME'] (or simply (in php) echo "<pre>";
print_r($_SERVER);echo "</pre>";) on both going to the site directly,
and then getting redirected there and see if there's a difference.

hostm...@enigmedia.com

unread,
Mar 4, 2010, 7:13:05 AM3/4/10
to reCAPTCHA
FWIW, I had the same issue as dylan...I had 6 domain names pointing to
the same website, and server side the content was altered depending on
the URL in the request header. I created six different reCaptcha keys
and inserted the one appropriate to that domain before the page is
served.

So this can be done server-side, but it's not as simple as just using
a global key.

Dylan, anyone could use your public key, but they would need your
private key to install your global key on their site...but more to the
point, there is nothing inherently "dangerous" about someone else
using your global key...they would just be displaying reCaptchas on
their site using your key.

Reply all
Reply to author
Forward
0 new messages