If your site contains offensive material, you could place the following code in your index file. It gives the user a confirmation dialog, where he can choose not to enter the site. See it in action.
You can also give the user a simple message using alert("message"). See it in action