I'm getting a 403 error everytime I try to log in with the user #1.

What can I do to get access again?

I have already tried to:

  • clear all cashes (via Drush)
  • set the time in both the server and Drupal's timezone, to be sure it isn't a cookie expiration problem

4 Answers 4


The problem began after I uncommented and defined a wrong $cookie_domain, in settings.php. (I needed this set up for FCKeditor/CKFinder.) Once I have corrected this, I've managed to log in again.

  • I've questioned and answered this question, because may be useful for others. I've lost too much time in this critical situation of not getting access to my site's administration! See more about posting a question you know the answer here: meta.drupal.stackexchange.com/questions/347/…
    – dxvargas
    Mar 10, 2012 at 11:46

Check that cookie domain, and site URL are the same, in the settings.php file.

Look for these lines:

$base_url = 'http://yourdomain.com';
$cookie_domain = 'yourdomain.com'

within the settings.php file.

Usually at: yourdomain.com/sites/default/settings.php

Remember to delete cookies from your browser and empty your browser cache before you try again.


Ok, you've solved your problem. I'm just trying to explain "how".

When you was logging in (with uid 1 or any user), the cookie was set on the wrong domain, but Drupal didn't know it. It thought you was logged in and redirect you to user/1. In this second request, browser sent an empty cookie and Drupal saw you as anonymous, which probably didn't have access user profiles permission and you got a 403.


This might be useful for you, if its not related to Drupal domain_cookies setting. https://drupal.stackexchange.com/a/266928/39462

  • This is prety much a link only answer ... Aug 4, 2018 at 7:03
  • @Pierre.Vriens , i don't want copy same answer everywhere, that's why just added actual link where i added my comment. Aug 4, 2018 at 8:36
  • Up to you, but think about how THIS answer will look like if the other answer ever gets deleted, e.g. via moderation. My 2 cents: include a relevant "quote" from that other answer then in this answer. PS 1: the downvote is NOT mine, so could it be somebody else has similar opinion? PS 2: if the answers are the same, are you sure that this question is not a duplicate of the other one? If so flag it like so ... good dluck Aug 4, 2018 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.