# Switch sites to insert cookie

**URL:** <https://community.a10networks.com/t/switch-sites-to-insert-cookie/104>\
**Category:** aFleX\
**Created:** [April 12, 2011, 1:30am UTC](https://community.a10networks.com/t/switch-sites-to-insert-cookie/104 "2011-04-12T01:30:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/bb9f186d33804d3044a0374e589f49fdf3be1328.png) [@system](https://community.a10networks.com/u/system)\
**Post date:** [April 12, 2011, 1:30am UTC](https://community.a10networks.com/t/switch-sites-to-insert-cookie/104/1 "2011-04-12T01:30:16Z")

</div>

**Posted by tcp-me**

I’m wondering if anyone has a good idea on how to do this.

My company’s site is say… [abc.com](http://abc.com)

My customers who use our service get [customer1.abc.com](http://customer1.abc.com). We’ve been inserting our cookie for [abc.com](http://abc.com) to track usage and session.

Now my customers want [survey.customer1.com](http://survey.customer1.com) to be the domain, but they’ll resolve the IP to our site. The problem is, we can only insert and search for cookies within our domain name. So currently our servers do this thing where clients come to [survey.customer1.com](http://survey.customer1.com), we switch them to [customer1.abc.com](http://customer1.abc.com), cookie their browser, and quickly take them back to [survey.customer1.com](http://survey.customer1.com).

We would like to do this on the AX seamlessly. What would the aFlex look like?

Thanks…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/bb9f186d33804d3044a0374e589f49fdf3be1328.png) [@system](https://community.a10networks.com/u/system)\
**Post date:** [April 12, 2011, 1:30am UTC](https://community.a10networks.com/t/switch-sites-to-insert-cookie/104/2 "2011-04-12T01:30:46Z")

</div>

**Posted by ddesmidt** On HTTP, when a client browses a web site (let’s say [www.abc.com](http://www.abc.com/)), the web server can provide a cookie that is valid for that site ([www.abc.com](http://www.abc.com/)) or for the whole domain “[abc.com](http://abc.com)”. But obviously for security reasons a server can’t provide a cookie for other domains such as [xyz.com](http://xyz.com). And if the server does, then the browser will drop it anyway. AX follows by default the HTTP protocol. That said, AX could be configured to provide cookies for other domains. But as said the browser would drop them. Dimitri
