Method for selectively encrypting web contents and computer-readable recording medium where program executing the same method

A method for selectively encrypting web contents and a computer-readable recording medium storing a program thereof are provided to increase communication speed, or a CPU efficiency of a server and a client without damaging security by encrypting the web contents requiring encryption selectively based on URL(Uniform Resource Locator) filter information. It is checked whether a security session issued from a host corresponding to a request URL is found(203). A server certificate is requested to an encryption communication server when the security session is not found(204). The received server certificate is authenticated and encrypted key exchange information is transferred to the encryption communication server(205,206). A session key is generated by using the key exchange information. A value encrypting a security session ID and URL filter information with the shared session key is received from the encryption communication server(210). The security session ID and the URL filter information are decrypted and applied to the security session(211).