Sorry, logging in from a different domain is not permitted. Please try again.

I am ALWAYS getting the above listed error whenever I try to log in. I have 3 different accounts set up. And ALL get the same response.

This is my build as of today: Release - 1.8.18, Version - 2014110100

Anyone out there have any thoughts, similar issues or suggestions.

  • Didn't work bro. It still says: "Sorry, logging in from a different domain is not permitted"

    Any other thoughts before I make the decision to "blow" the site, and start from scratch? :(

  • @iionly's .htaccess rule should work, but you can also do this with basic PHP:

    if ($_SERVER['HTTP_HOST'] == 'crossovermagazine.com') {
        header("Location: http://www.crossovermagazine.com{$_SERVER['REQUEST_URI']}");
        exit;
    }

    I think you could put this in settings.php until you can get the Apache redirect working.

  • To Steve: I inserted your line towards the top of the Settins.php file, and still the same errors continue. Have we run out of options now?

  • Looks fine to me, hitting your site at http://crossovermagazine.com automatically sends me to http://www.crossovermagazine.com

    Assuming your site is configured with the www version in the admin -> settings -> advanced settings you should be good now.  Clear caches etc if you haven't already.

  • Do you get the error regardless which url you enter, i.e. with or without the "www" part? Is the error always the same? If it doesn't matter if you include www or not the reason for the error must be something else.

    Which plugins are you currently using (beside the plugins bundled with Elgg) and especially which plugin are you using to allow for log in with a Twitter account (any 3rd party plugin for this)? Are you trying to log in with an account created on your Elgg site or has the account being created using the account credentials of a Twitter account? I don't know if the Twitter login option has anything to do with it (like registering an API key at Twitter by providing your site url without "www" there) but it might be worth a try to disable the login by Twitter at least to test out if this stops the error from occuring.

  • Actually... The error that I am getting: "Sorry, Logging in from a different domain is not permitted"... Has been happening from the VERY start. Even when it was just a "bare-bones" install. One item of note is, if I clicked on one of my already existing accounts to view the profile itself, I was able to login safely. The new theme (wikifb), is now denying me the ability to that any more. So now, I am basically locked out by the initial error itself, no matter what I do.

  • One item of note is, if I clicked on one of my already existing accounts to view the profile itself, I was able to login safely.

    This was because when you click on a link, you were redirected to the correct address.

  • Exactly. But why is the presence of the "wikifb" theme now causing that move to go out the window? Could it be because of the "double-login" choices at the main site window?

  • If you're getting it constantly now you probably put the wrong redirect code in settings.php

    Likely you're redirecting to always www but your site is configured for non-www

    Remove the part that steve told you to put in settings.php.  Log in as an admin.  Change your site setting url to www, then put the code back in settings.php

  • The usage of the wikifb plugin could have introduced an issue of its own that isn't necessarily connected with the original problem of "Sorry, logging in from a different domain is not permitted". The wikifb plugin has only recently been released and might still be buggy. I would suggest to first test if the change in .htaccess did solve your original issue without the wikifb plugin in use (at least the redirect from crossovermagazine.com to www.crossovermagazine.com seems to work now).

    If you can't log in at all (and therefore not directly disable the wikifb plugin), you should create a file in the mod folder of Elgg that you name "disabled" (no content of the file necessary only the name must match). The presence of this file will make all plugins inactive and you should then be able to log in again. Then you can disable any plugin in the admin area for real, i.e. to keep them disabled when removing the "disabled" file from your mod folder again. Try again if the original error at login still happens now with the change in .htaccess but without the wikifb plugin.