Ali Sheikhpour
Ali Sheikhpour

Reputation: 11086

Do cookies expire on server IP change?

I am going to change the server of my website and SQL server will move to new server too. The url (Domain Name) wont change but the IP will change.

Does members who have previously logged in will log out? I use Cookies to keep users signed in.

If the cookies expires, how can I perform this task? I am using PHP to set cookies for users.

Upvotes: 4

Views: 816

Answers (1)

Quentin
Quentin

Reputation: 944008

Cookies are associated with hostnames, not IP addresses.

The browser won't expire them just because the domain moves. That would break a lot of load balancing systems!


If the cookie relates to information on the server (e.g. a session id) and that data doesn't get transferred to the new server, then the connection will be lost though.

Upvotes: 7

Related Questions