Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

305
Views
Will the cookies be shared across multiple subdomains, if all subdomains point to the same single website?

I would like to create website, which can behave differently based on subdomains.

If I set a certain cookie on subdomain A, can I read/access it on subdomain C? Or the cookie binds to the subdomain?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

When you set cookie, there is a Domain attribute. This is its explanation from MDN

Domain attribute The Domain attribute specifies which hosts can receive a cookie. If unspecified, the attribute defaults to the same host that set the cookie, excluding subdomains. If Domain is specified, then subdomains are always included. Therefore, specifying Domain is less restrictive than omitting it. However, it can be helpful when subdomains need to share information about a user.

For example, if you set Domain=mozilla.org, cookies are available on subdomains like developer.mozilla.org.

Basically, you just need to specify the Domain attribute in Set-Cookie.

about 4 years ago · Juan Pablo Isaza Report

0

I suggest you read this question post, in summary it says that what's important is the domain parameter you define to set the cookie. What your looking for is something like this ".mydomain.com".

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!