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

  • SEARCH
  • Home
  • 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

Related Questions

A Session is per browser (determined via cookies), but when does an Application start,
Sessions in PHP seemed to have changed since the last time I used them,
In my ASP.NET application using InProc sessions, Session_End calls a static method in another
This question is about App domains and Sessions. Is it possible to have IIS
What is the actual difference between session.gc_maxlifetime and session_cache_expire() ? Suppose I want the
I'm working on a Web project using Asp.Net MVC, which I'll have to deploy
I have the run-of-the-mill login-based PHPSESSID mechanism implemented for my web app. One aspect
I have a project where I would like to create two session cookies in
What's an elegant way in Classic ASP to check if session cookies are enabled
Is keeping JMS connections / sessions / consumer always open a bad practice? Code

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.