Since the introduction of SSL certificate, many webmasters or enterprises began to attach importance to HTTPS encryption, but, you know how to use HTTPS correctly? The small series will give you a way to
Use a reliable security certificate: During the process of enabling HTTPS for a Web site, you must obtain a security certificate. The certificate is issued by a certificate authority (CA) that takes steps to verify that your website address really belongs to your organization, protecting visitors from man-in-the-middle attacks. When setting up a certificate, you can select a 2048-bit key to ensure a high level of security. If the key (1024-bit) of the certificate you are holding is less secure, upgrade it to 2048-bit.
redirect Users and search engines to HTTPS Web pages or resources using server-side 301 HTTP redirection.
Use relative URLs for resources that are located in the same security domain. This not only ensures that your links and resources always use HTTPS, but also reduces the vulnerability in the local development process because pictures, pages, and other resources are loaded through the local development environment, not the production environment.
Use relative protocol URLs for all other domains, or update your site links to link directly to HTTPS resources.
Use a network server that supports HTTP strict transport security (HSTS) and make sure it is enabled. Even if the user enters http,hsts in the browser address bar, the browser will be notified that the HTTPS request page is automatically used. In addition, it informs Google to provide a secure URL in search results. These can minimize the risk of providing unsafe content to users.
IMPORTANT: If you use HSTS, make sure Google can crawl your HTTPS pages and index them: if you want Google to crawl and index these pages, do not block them with robots.txt files or include noindex meta tags in them. 。 Use Google crawl to test whether Googlebot can access your site.
1 USD 30 days VPS Free Grab
This article is from the "Uncle Li" blog, please be sure to keep this source http://lidashu.blog.51cto.com/12659943/1904757
Best practices when using HTTPS