Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 874827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:10:03+00:00 2026-05-15T11:10:03+00:00

I simply cannot believe this is quite so hard to determine. Even having read

  • 0

I simply cannot believe this is quite so hard to determine.

Even having read the RFCs, it’s not clear to me if a server at subdomain.example.com can set a cookie that can be read by example.com.

subdomain.example.com can set a cookie whose Domain attribute is .example.com. RFC 2965 seems to explicitly state that such a cookie will not be sent to example.com, but then equally says that if you set Domain=example.com, a dot is prepended, as if you said .example.com. Taken together, this seems to say that if example.com returns sets a cookie with Domain=example.com, it doesn’t get that cookie back! That can’t be right.

Can anyone clarify what the rules really are?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:10:04+00:00Added an answer on May 15, 2026 at 11:10 am

    Yes.

    If you make sure to specify that the domain is .example.com, then *.example.com and example.com can access it.

    It’s that principle that allows websites that issue cookies when somebody goes to http://www.website.com to access cookies when someone leaves off the www, going to website.com.

    EDIT: From the PHP documentation about cookies:

    domain The domain that the cookie is
    available. To make the cookie
    available on all subdomains of
    example.com then you’d set it to
    ‘.example.com’. The . is not required
    but makes it compatible with more
    browsers. Setting it to
    http://www.example.com will make the cookie
    only available in the www subdomain.
    Refer to tail matching in the » spec
    for details.
    http://php.net/manual/en/function.setcookie.php

    And it’s not unique to PHP.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Issue Cannot believe I could not find anything on this around the net,
I simply cannot find how to do this. so, I have a String that
Hey guys I simply cannot get this to work. I have some content that
I don't know what I'm not doing but I simply cannot get my own
It seems like it should be so simple, but I simply cannot get this
I've run into a bit of a problem, which I simply cannot find a
I just found Data::Section and I got interested in it. Unfortunately, I simply cannot
I know that you cannot simply set DocumentRoot in htaccess but it's all I
I simply can not get Visual Studio 2005 to find the System.Configuration.ConfigurationManager class. Here
I've looked at similar problems but I simply can not see what is going

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.