First, use a self-signed ssl certificate. This certificate can be issued at will, unconstrained and unsupervised, so it is not trusted by any browser or operating system, so it will be unsafe.
In another case, an ssl certificate issued by an untrusted CA institution is used, and the browser will also prompt that it is unsafe. To purchase ssl certificates, you must choose internationally authoritative and well-known CA institutions, such as Symantec, Geotrust, Comodo and RapidSSL.