Introduction

Cookies are important in MyBB to identify and verify logged-in users, and store inline-moderation selections. Incorrect cookie settings are the leading cause of login/logout problems on forums. If you or your users are having problems logging into the Front End of your board, see if the cookie settings are the culprit before posting your support request on the forum.

MyBB has three inherent settings related to cookies:

  • Cookie Domain
  • Cookie Path
  • Cookie Prefix

This is the domain or subdomain that contains your forum. Usually a period/dot (“.”) is placed in front of this domain/subdomain in order to include all of its subdomains

This is the path from the root of your domain to your forum directory. The starting slash and ending slash should be included.

This is a prefix to all cookies used by your forum, to further prevent any conflicts with other installations of MyBB on the same domain or conflicts with other softwares.

Examples

Forum URL Cookie Domain Cookie Path
http://www.example.com .example.com /
http://www.example.com/directory/ .example.com /directory/
http://www.subdomain.example.com subdomain.example.com /
http://www.subdomain.example.com/directory/ subdomain.example.com /directory/

This tool can help generate valid cookie settings.

The following is a list of the cookies that MyBB sets, and a note about each one:

acploginattempts
Stores the number of ACP login attempts a user has had.
acp_view
Stores the admin's preferred view when inline editing users in the ACP.
adminsid
Stores the current admin's Admin Session ID.
collapsed
This cookie keeps track of which categories and boxes have been collapsed (as opposed to being expanded by default).
coppadob
Stores user date of birth to submit with registration.
coppauser
Stores whether the user is a COPPA user or not.
failedlogin
If the user has exceed the maximum login attempts, failedlogin stores the time (UNIX timestamp) of the failure.
forumpass[$fid]
Stores a version of the forum password for $fid when a user has entered it correctly, to avoid prompting the user for a password more often than required.
inlinemod_
There are multiple kinds of inline moderating cookies: forum, thread, and user, including:
  • inlinemod_forumfid
  • inlinemod_threadtid
  • inlinemod_useracp - for storing users to inline-edit in the Admin CP
fid is replaced with the forum ID and tid is replaced with the thread ID. The contents are a pipe-delimited and pipe-enclosed list of thread IDs or post IDs which have been checked for inline moderation.
loginattempts
Stores the number of login attempts a user has had.
multiquote
mybb
The mybb cookie is actually an array of cookies:
mybb[announcements]
Stores read annoucement IDs.
mybb[forumread]
Stores forums the user has read.
mybb[lastvisit]
This cookie stores the last time of visit in the UNIX timestamp format.
mybb[lastactive]
This cookie stores the last time that a forum page has been loaded, in the UNIX timestamp format.
mybb[threadread]
Stores threads read by the user.
mybb[readallforums]
Stores if the user has read all forums. Updated with mybb[lastvisit] in inc/functions_indicators.php.
mybb[referrer]
mybblang
Stores the language preference of a guest.
mybbratethread[{$tid}]
Stores the user's rating of thread $tid.
mybbtheme
Stores the theme preference of a guest.
mybbuser
This cookie stores the login information for the Front End, and is set when a user logs in, and is removed when the user logs out. The UID and the login key are stored in this cookie.
pollvotes[$pid]
Stores a guest's vote on poll $pid.
sid
The current user's Session ID.

Edit this page on GitHub