views:

14

answers:

1

Hi,

I have a website where I want to do transaction which has to be done over https, but the https works only without www (due to some issue while taking SSL certificate).

  1. http:/ /www.example.com
  2. https:/ /example. com

I want to set the cookies which are accessible in above of two.

Limitations: 1. https:/ /example. com can not made https:/ /www.example. com, due to SSL certificate is not available for www.example. com) 2. http:/ /www.example. com can not be made http:/ /example. com, because Google has indexed lots of pages with www, so if you remove now, you loose the SEO

Regards, Prashant

A: 

for a cookie to be valid on all Subdomains, you use

.example.com (The dot at the beginning is important!)

I'm not sure about the SSL part though, you might get a warning if the non-secure cookie is being read on the secure domain.

Hope this helps, Freddy

freddy K.