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 352367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:43:50+00:00 2026-05-12T11:43:50+00:00

For sessions and cookies, is there a difference between example.com and www.example.com? I have

  • 0

For sessions and cookies, is there a difference between example.com and http://www.example.com?

I have a very strange problem with our web application

The privat web is: private.example.com
The public web is: example.com

For some reasons outside my control http://www.example.com is allways redirected to example.com
I guess this is the setup on the server.

The problem is when I log in to the admin console, and open a new tab and requests the public site, the log in session is lost.

This only happens in IE 7

After some diging I found this site:

http://blogs.msdn.com/ieinternals/archive/2009/08/20/WinINET-IE-Cookie-Internals-FAQ.aspx

See Q3

Can it be that the session set in admin(private.example.com) is deleted when I access the public site? Since the server is redirecting me to example.com?

I think we do not specify the domain part when setting the cookie (Java)

As I said, this only happens with XP SP3 and IE7

Anyone who can help me, or correct my understanding of the IE stuff.

  • 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-12T11:43:50+00:00Added an answer on May 12, 2026 at 11:43 am

    Yes, cookies are domain and even sub-domain specific. So this is the problem. For consistency’s sake, I’d try to find a way to keep it on the same sub-domain.

    You said the redirect from http://www.yourdomain.com to yourdomain.com is outside your control. Is that because you don’t have access to the server? If so, you could attack it from another angle. Instead of preventing the redirect, you could set up a global 301 redirect rule so that every user who goes to http://www.yourdomain.com is instantly redirected to yourdomain.com (kinda like StackOverflow.com). That way it remains consistent on every page of the site.

    There are many different ways to accomplish this. But if by chance you’re using .NET, see my answer to this question:
    Setting up HTTP Redirect for SEO in IIS7

    That’s a pure .NET code solution that requires no additional modules so it’d work even if you don’t have access to the server. Actually that answer is for the reverse scenario (non-www to www) but it could easily be modified for this task.

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

Sidebar

Ask A Question

Stats

  • Questions 188k
  • Answers 188k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you want to color individual days in the calendar,… May 12, 2026 at 5:37 pm
  • Editorial Team
    Editorial Team added an answer See you've asked the same question at http://wordpress.org/support/topic/321046 See http://codex.wordpress.org/Function_Reference/get_post_ancestors May 12, 2026 at 5:37 pm
  • Editorial Team
    Editorial Team added an answer Assuming all keys are valid, of course... If the request… May 12, 2026 at 5:37 pm

Related Questions

What is the actual difference between session.gc_maxlifetime and session_cache_expire() ? Suppose I want the
I have a website that I am working on that has both an intranet
I am new to the world of J(2)EE and web app development but am
I've got two ASP.Net applications residing in two different folders on my server: /Foo

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.