When a site is moved from HTTP to HTTPS which is already indexed by Google, we must add a new property for the HTTPS URL in Goolge search console. When Google tries to index the site and it finds HTTP URL indexed for the same page, it will mark the HTTPS pages as canonical. We should use “301 Moved Permanently” to tell Google that HTTP URLs are moved to HTTPS and Google should prefer HTTPS over HTTP. Here is a sample code to be used in an ASP.NET web application for 301 moved status
After configuring SSL for a website, we need to make sure all existing HTTP URLs are automatically redirected to the HTTPS. For this we need to add a redirect rule in our web.config file. Open your web.config file and add following code snippet under system.webServer tag (copy it before the closing system.webServer tag) Save web.config file and upload it to the server tp replace existing one.
Many web hosting providers support and automatically enable Let’s Encrypt and redirect http to https by default. GoDaddy does not yet support it but we can manually install and configure our sites on GoDaddy shared hosting to support SSL. This is done in two steps. In the first step, we need to generate certificates from a certificate authority (CA) and then in the second step, we need to download generated certificates and upload it to the GoDaddy servers and configure it there. Support for third-party SSLs on GoDaddy While generating SSL certificates for our domain, we will also need to verify domain ownership to CA. In order to verify domain ownership using HTTP verification, we will need to create appropriate files with specific text strings under “httpdocs/.well-known/pki-validation/” directory on our web server. We also need to make sure that those appropriate files are accessible in the directory. We will first[…]