The certificate was purchased and activated, the site with https does not open correctly. The way to solve this problem:
1. In the file sites/default/settings.php find the line with $base_url. Under this line add:
$conf['https'] = TRUE; $base_url = 'https://old.domain.com';
Replace the domain name with the actual one, and do not put a slash after the domain!
2. In the source code of the page, you can see that there are many mentions of http:// in the content and in the head section.
Edit files:
/sites/all/themes/yourtheme/template.php /sites/all/themes/yourtheme/templates/html.tpl.php /robots.txt /sitemap.xml (if exists on the server in the list of files)
and in these files replace all http:// to the https://.
3. Edit .htaccess, after RewriteEngine on add this one:
RewriteCond %{HTTP_HOST} ^www\.(.*)$ RewriteRule ^(.*)$ https://%1/$1 [L,R=301] RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
A redirect from www to a case with https is not needed, but I need it for copying as part of this task.
Next, go to edits in the database. In the source code, see what links are left with HTTP and look for links in PhpMyAdmin or Adminer and make SQL queries in the format:
UPDATE field_data_body SET body_value = REPLACE(body_value, 'http://', 'https://');
After editing the database, go to the admin panel /admin/config/development/performance (Configuration > Development > Performance) and then clear the cache.
When all links are updated in the files and in the database, a notification “Connection is secure” will appear on the site.