You can force your WordPress site to use HTTPS to ensure that all traffic and data transmitted between your visitors and your server are encrypted. This procedure is intended for Site Administrators and ensures that the WordPress configuration correctly recognizes your site's secure URL.
Before you begin
You will need:
Administrator access to your WordPress dashboard.
A valid SSL certificate installed on your domain.
Access to your WordPress configuration files (via FTP or a File Manager).
Update WordPress Site URLs
To ensure WordPress generates the correct links and redirects, you must update the site's internal URL settings.
Log in to your WordPress dashboard.
Navigate to Settings > General.
Locate the WordPress Address (URL) and Site Address (URL) fields.
Change the protocol from
http://tohttps://in both fields.Scroll to the bottom of the page and click Save Changes.
Force HTTPS via .htaccess
If your site still allows users to access the non-secure version, you can add a rule to your .htaccess file to force a redirect.
Access your site's root directory using an FTP client or a File Manager.
Locate the
.htaccessfile in the root directory.Open the file and add the following code at the top of the file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Confirm the result
Navigate to your website's homepage.
Verify that the browser displays a padlock icon in the address bar.
Click the link to any internal page to ensure the URL remains on the
https://protocol.
Limitations
This procedure does not automatically fix "Mixed Content" warnings. If your site still shows a warning that some resources (like images or scripts) are loaded over HTTP, you may need to update those specific URLs within your content or via a search-and-replace tool.
